ADC Software trigger and Hardware Trigger using LPTMR along with FreeRTOS

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

ADC Software trigger and Hardware Trigger using LPTMR along with FreeRTOS

936 次查看
prabhus
Contributor II

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 项奖励
回复
3 回复数

870 次查看
prabhus
Contributor II

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 项奖励
回复

855 次查看
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 项奖励
回复

910 次查看
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 项奖励
回复