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

ADC issues

Hi, 

We are seeing the issue mentioned in https://devzone.nordicsemi.com/f/nordic-q-a/20291/offset-in-saadc-samples-with-easy-dma-and-ble/79053#79053. We have 2 sensors that both require the ADC to process their outputs. We are getting data from sensor 1 in the spot where data from sensor 2 should be and vice versa. We have tried both of the solutions mentioned in your post, yet neither of them seem to work. We have tried making the sensors post their output in a timer callback with much higher priority than the ADC, yet we still see this channel switching issue. Are there any other solutions that could help with this issue?

Thanks

Parents
  • Hello,

    We are getting data from sensor 1 in the spot where data from sensor 2 should be and vice versa.

    Does this shift only happen once, or does it happen periodically?
    How often are you calibrating your SAADC? - Could it be that you are seeing the effects of Errata 237, namely that an unexpected sample is written to the buffer in the case that calibration is done between TASKS_START and EVENTS_END?

    We have tried making the sensors post their output in a timer callback with much higher priority than the ADC

    Thank you for elaborating on what you have tried thus far - I do not think that this is caused by a priority mismatch, but it is good to have checked it out even still.

    Looking forward to resolving this issue together!

    Best regards,
    Karl

Reply
  • Hello,

    We are getting data from sensor 1 in the spot where data from sensor 2 should be and vice versa.

    Does this shift only happen once, or does it happen periodically?
    How often are you calibrating your SAADC? - Could it be that you are seeing the effects of Errata 237, namely that an unexpected sample is written to the buffer in the case that calibration is done between TASKS_START and EVENTS_END?

    We have tried making the sensors post their output in a timer callback with much higher priority than the ADC

    Thank you for elaborating on what you have tried thus far - I do not think that this is caused by a priority mismatch, but it is good to have checked it out even still.

    Looking forward to resolving this issue together!

    Best regards,
    Karl

Children
  • This shift happens every time we check for a response. If we disable sensor 2, we get the response from sensor 1 in the correct spot. We are not calling the calibration function at all. 

    Thanks,

    Ankeet

  • Hello again, Ankeet

    Thank you for your patience with this. The summer holidays have begun here in Norway, and DevZone is therefore operating with reduced staff for the time being. Sorry for any inconvenience this might cause.

    AMutha said:
    This shift happens every time we check for a response.

    That is very peculiar, and leads me to believe there might be an issue with the application logic. Could you possibly share with me the SAADC callback handler function, along with its initialization and usage?

    Please use the Insert -> Code option when sharing code here on DevZone.

    Best regards,
    Karl 

Related