ADC Software trigger and Hardware Trigger using LPTMR along with FreeRTOS

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

ADC Software trigger and Hardware Trigger using LPTMR along with FreeRTOS

393 Views
prabhus
Contributor I

Hi, I'm working with FreeRTOS. ADC 0 has 3 channels with software triggers, while ADC 0 also has 2 channels with hardware triggers using LPTMR. ADC 1 has 5 channels triggered by a software timer. After configuring it correctly with LPTMR, ADC 0's callback works properly, but afterwards, it goes to the hard fault handler.

 

 

 

0 Kudos
Reply
3 Replies

327 Views
prabhus
Contributor I

is it possible to read ADC0 only with hardware trigger 2 channel and software trigger 3 channel.

i cant able to read two method in same adc0 alone.

If I set a hardware trigger using Timer0, I am unable to achieve sampling intervals of less than 10ms using the hardware trigger method alone.

0 Kudos
Reply

312 Views
danielmartynek
NXP TechSupport
NXP TechSupport

HI @prabhus,

The ADC module can work either with SW trigger or HW trigger depending on the configuration of SC2[ADTRG].

You would need to switch the configuration every time and this is not recommend.

 

BR, Daniel

 

0 Kudos
Reply

367 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @prabhus,

This requires some debugging on your side, can you follow this document and provide more information about the fault exception?

https://community.nxp.com/t5/S32K-Knowledge-Base/Fault-handling-on-S32K14x/ta-p/1114447

You must ensure the ADC is not triggered by the SW and the HW at the same time.

 

Regards,

Daniel

0 Kudos
Reply