EXT vs ICU: which one should I use?

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
Dolence
Posts: 7
Joined: Tue Feb 02, 2016 6:53 pm

EXT vs ICU: which one should I use?

Post by Dolence »

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!
User avatar
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?

Post by Giovanni »

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
Dolence
Posts: 7
Joined: Tue Feb 02, 2016 6:53 pm

Re: EXT vs ICU: which one should I use?

Post by Dolence »

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?
User avatar
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?

Post by Giovanni »

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
Post Reply