I'm trying to configure the ADC to use a PWM output as trigger, in a BLE project.
Once the right IRQ was enabled, when I try to start the timer, the program hangs.
If I start the timer without enabling the IRQ - the timer works (I can see it flipping a pin).
Is there an inherent limitation on using (certain) IRQs in a BLE project?
Hi Sebastian and thank you for the reply, I was able to work through some of the difficulties, except for one main issue, which has to do with pending a callback function call inside an ISR.
I am using the QN9090DK with the latest SDK and have constructed a project exemplifying the issue I'm facing, based on the wireless UART example project (RTOS version).
Basically I am setting up a PWM to drive the ACD which has its ISR called every 1 second. I need to broadcast some data over BLE when the ISR is hit, so I'm using App_PostCallbackMessage to issue a pending callback (the callback would be BleApp_FlushUartStream), but using PostCallbackMessage hangs the system... stepping into it, I witnessed that actually gets hung internally on a call to xQueueSendFromISR, which is documented to be safe to use from within ISRs...).
Kind help would be appreciated.. as using pending callbacks correctly from within ISR is crucial to understand.
Could you please take a look at the implementation of the ADC reading in the Wireless UART when enabling the cPWR_FullPowerDownMode macro definition?
This enables some additional functions in the wireless_uart.c source file to take ADC measurements.
It achieves a similar result to what you're trying to do with your implementation, including posting a message for the scheduler to enter a certain Callback function, which in this case is "AdcMeasurementCallback".
Please let me know if you continue to have issues.
Hi Sharon, I hope you're doing well!
Could you please provide some more information about which device, SDK version, and code example are you using?
Take care, best regards,