Any IRQ related limitations on using hardware triggers for ADC with BLE?

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

Any IRQ related limitations on using hardware triggers for ADC with BLE?

1,119 次查看
urban_sharon
Contributor III

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?

Thanks

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

1,021 次查看
urban_sharon
Contributor III

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.

Thanks,

  Sharon

0 项奖励

1,021 次查看
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Sharon,

 

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.

 

Best regards,

Sebastian

0 项奖励

1,021 次查看
Sebastian_Del_Rio
NXP Employee
NXP Employee

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,

Sebastian

0 项奖励