Pulse counting

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pulse counting

487 Views
Ferberber
Contributor I

Hi,

I'm looking a solution for counting up to 8 channels pulse inputs  without CPU interferance.

Thanks

Tags (1)
0 Kudos
Reply
1 Reply

376 Views
EarlOrlando
Senior Contributor II

Hello Ferberer,

Usually it is approached using a GPIO as the trigger source for a DMA channel and configuring a counter register (i.e. PIT or FTM) as the source address in the DMA channel and a buffer as the destination address. Unfortunately, only one signal can do this per each port so you won't be able to control 8 channels.

For 8 channels you can use the input compare feature in the FTM but you will need the CPU to store the counter values.

Also, if you are interested in the signal period or the pulse width of your signal, you can read about the dual-edge capturing mode.

I recommend you to take a look into the application note AN5142​ which explains the features of the FlexTimer Module.

Best regards,

Earl.