Hi!
I wanna count pulses from a hall effect based flow meter. Knowing how much pulses per liter this sensor outputs and counting the total pulses while the liquid passes through the sensor, I should be able to measure how much of liquid has been dispensed in a more or less accurate way.
Should I use EXT or ICU to achieve this?
Thanks in advance!
EXT vs ICU: which one should I use?
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: EXT vs ICU: which one should I use?
Hi,
You could use both for this but EXT is obsolete. In ChibiOS 18 you can use the PAL driver to do the same things more easily.
At the end you just count interrupts with both methods so just use the least expensive option. You may also use a timer at low level as a pulse counter and not have to serve interrupts.
Giovanni
You could use both for this but EXT is obsolete. In ChibiOS 18 you can use the PAL driver to do the same things more easily.
At the end you just count interrupts with both methods so just use the least expensive option. You may also use a timer at low level as a pulse counter and not have to serve interrupts.
Giovanni
Re: EXT vs ICU: which one should I use?
I'm on chibistudio and ChibiOS 17.6. Chibios 18 is trunk? I'm planning to use ugfx in this project and I don't know if it's ready to work alongside with development branch. Regarding timer at low level without using interrupts, is there any example of something similar on demos?
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: EXT vs ICU: which one should I use?
Dolence wrote:Regarding timer at low level without using interrupts, is there any example of something similar on demos?
Low level things are documented in the STM32 Reference Manual, TIMxx section.
Giovanni