This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

question about nrfx_saadc_sample_convert blocking mechanism

To the kind attention of Nordic team,

About what has been said in https://devzone.nordicsemi.com/f/nordic-q-a/51879/saadc-in-sample-convert, I'd like to know if the blocking mechanism

used for nrfx_saadc_sample_convert could be in theory interfering with softdevice ble timing also. As we are experiencing rare, random BLE_HCI_CONNECTION_TIMEOUTs

during established ble connections. It could may very well be due to clock drifts. But also noticed that sometime we get BLE_HCI_CONNECTION_TIMEOUT after

using nrfx_saadc_sample_convert. Could be there any form of correlation, or softdevice is not affected at all by it in your opinion?

Thank you for your kind clarification,

Best regards

Parents
  • Hi,

    That this function is blocking simply means that it contains a busy-loop, waiting for an event from the SAADC peripheral to be triggered (indicating that sampling is completed). The function should in no way block handling of timing-critical softdevice tasks, which runs at highest interrupt priority. The nrfx_saadc_sample_convert() function does not run in any interrupt context itself, it will run at the priority of the caller-function.

    Unless there is an error codes returned from the function that puts the application into the error handler, or a HardFault occurs (which could/would trigger a reset of the chip), I doubt that this function has anything to do with the BLE_HCI_CONNECTION_TIMEOUT.

    Best regards,
    Jørgen

Reply
  • Hi,

    That this function is blocking simply means that it contains a busy-loop, waiting for an event from the SAADC peripheral to be triggered (indicating that sampling is completed). The function should in no way block handling of timing-critical softdevice tasks, which runs at highest interrupt priority. The nrfx_saadc_sample_convert() function does not run in any interrupt context itself, it will run at the priority of the caller-function.

    Unless there is an error codes returned from the function that puts the application into the error handler, or a HardFault occurs (which could/would trigger a reset of the chip), I doubt that this function has anything to do with the BLE_HCI_CONNECTION_TIMEOUT.

    Best regards,
    Jørgen

Children
No Data
Related