Adc triggered with pit timer FRDM-MCUXC242

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Adc triggered with pit timer FRDM-MCUXC242

1,891件の閲覧回数
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 件の賞賛
返信
1 返信

1,860件の閲覧回数
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 件の賞賛
返信