Hello!
I am using an saadc examole to get sensor value using AIN3 and sending it on ble but now i want to make it interrupt base example can someone help me out how to do this????.
Thanks.
Hello!
I am using an saadc examole to get sensor value using AIN3 and sending it on ble but now i want to make it interrupt base example can someone help me out how to do this????.
Thanks.
Hi,
You can find a interrupt based SAADC + BLE example in this GitHub repository. The example samples multiple SAADC input channels, but you can disable the channels that you do not need.
Best regards,
Jørgen
Hi,
In saadc_init(), the SAADC peripheral is configured along with buffers for storing samples directly in RAM During init, the interrupt for END event is enabled in the SAADC driver.. A timer is configured along with PPI, to trigger the SAADC sample task at a regular interval, without any CPU intervention. Then the SAADC sample task has been triggered enough times to fill the buffer, an END event is generated by the peripheral, triggering the IRQHandler in the SAADC driver. The IRQHandler calls the saadc_callback() where samples are processed and buffer are setup for re-use.
Best regards,
Jørgen
If i want that data on ble and uart should be sent when interrupt occur where should i paste the code of ble and uart.Also where to set the timer timing to make tinterrupt early or late.????
If i want that data on ble and uart should be sent when interrupt occur where should i paste the code of ble and uart.Also where to set the timer timing to make tinterrupt early or late.????