S32K118 FreeRTOS + ADC

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

S32K118 FreeRTOS + ADC

989 次查看
Pohsuan
Contributor III

Hello NXP Team,

I'm currently porting the Adc_Pdb_Ip_example_S32K118 to the FreeRTOS_Toggle_Led_Example_S32K118 project.

I’m able to retrieve ADC values successfully in the ADC callback (AdcConversionCompleteNotif).
However, once I call xQueueCreate, the ADC callback (AdcConversionCompleteNotif) no longer gets executed.

Is there any configuration I might be missing?

Please see my attached code for reference. Thank you for your assistance.

标记 (1)
0 项奖励
回复
4 回复数

924 次查看
Pohsuan
Contributor III

Hello NXP team

Would you happen to have any suggestions regarding this issue?

thank you

标记 (1)
0 项奖励
回复

912 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this could relate to interrupt priority, as outlined e,g, in https://community.nxp.com/t5/S32K/Interrupt-in-FreeRTOS-for-S32K144/td-p/1396065

Also could be recommended to use latest RTD and FreeRTOS driver versions.

BR, Petr

0 项奖励
回复

905 次查看
Pohsuan
Contributor III

Hello PertS

Thank you very much for your response.

I’ve attempted to change configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY from 1 to 9, and also used NVIC_SetPriority set ADC0_IRQn to 7, but unfortunately, the AdcConversionCompleteNotif is still not being triggered.

Pohsuan_1-1745832988774.png

Are there any other suggestions you could provide?
Alternatively, can I use the IntCtrl_IP driver to capture the ADC Conversion Complete flag?

It will be any different?

标记 (1)
0 项奖励
回复

776 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

another common issue could be: if a function/driver uses OS services, it's mandatory to call them after starting the scheduler. Maybe this is the reason.

You can refer to below discussion which could be helpful:

https://www.freertos.org/FreeRTOS_Support_Forum_Archive/March_2017/freertos_What_is_normal_method_fo...

BR, Petr

0 项奖励
回复