Adc triggered with pit timer FRDM-MCUXC242

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

Adc triggered with pit timer FRDM-MCUXC242

1,883 Views
Transidico
Contributor III

Good morning,
I would like to trigger adc in dma with continuous acquisition with the timer pit set to 1ms. I have set both adc and pit in peripherals.h. The intention is to create a system of acquisition by the adc timed with the pit period, so that every 1ms that the pit gives the trigger to the adc it returns the conversion value to me. I have tried to execute this in the code I will attach below, but I only see it working properly if I activate the pit interrupt, could you tell me how I should make it work without the interrupt and only in trigger mode? Could you give me some feedback?
Thank you in advance.

Greetings

0 Kudos
Reply
1 Reply

1,852 Views
Pablo_Ramos
NXP Employee
NXP Employee

Hi @Transidico 

When you disable the PIT interrupt, what are the changes you made on the code?

What is the behavior when the interrupt is not enable? Does the code stay on a loop?

The Timer Flag Register (PIT_TFLGn) should still set at the end of timer period even though the interrupt is not enabled, if in the MainLoop instead checking for your flag (pitTriggered) you check for the Timer Interrupt Flag and clear it afterwards do the behavior changes?

0 Kudos
Reply