embedded - Polling or Interrupt based method -


When should someone use the voting method and when the method based on the middle should be used? Are there scenarios in which both can be used?

If the status of interest is:

  1. unstable
  2. Immediate
  3. irregular

Then an interrupt based handler will mean.

If there is a situation of interest:

  1. Synchronous (i.e. you know when it is expected within a small window)
  2. Not immediately (I.e. there is no bad effect in slow polling intervals)
  3. Often (i.e. most of your voting cycles make 'hits')

then voting is a better fit It is possible.

Include other ideas that you are writing a device driver for the OS, or writing a bare metal code of thread support. In bare metal situations, the CPU is usually only looping when it If it is not busy then it can vote anything.


Comments