S32K118 FreeRTOS + ADC

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

S32K118 FreeRTOS + ADC

538 Views
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.

Tags (1)
0 Kudos
Reply
4 Replies

473 Views
Pohsuan
Contributor III

Hello NXP team

Would you happen to have any suggestions regarding this issue?

thank you

Tags (1)
0 Kudos
Reply

461 Views
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 Kudos
Reply

454 Views
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?

Tags (1)
0 Kudos
Reply

325 Views
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 Kudos
Reply