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

soft device interrupts

Hello,

I just have a basic query. I am using soft device S132. In the product specification, it's written that interrupts occur while advertising/scanning/connection. Is there any way possible for me to identify each and every interrupt that occur like radio timeslot prepare, Radio start, pre processing etc. Radio notification only helps me in notifying when the softDevice uses radio and not each and every interrupt. Also, I am using sd_app_evt_wait() which runs in WFE() and not WFI(). This was what's recommended in various posts in Devzone. Is it right now necessary for me to shift to WFI() if I need to know when each and every interrupt occurs and if yes, is there any consequences to it.

Second question is a bit different and not related to SoftDevice but the nrf52832 chip. I am using the SAADC and calibrate it just before initializing all the channels. Everything works fine but I need to know the algorithm in which calibration occurs. I read that the sampling voltage reference is GND, which makes me wonder whether or not the error rate will be high.

Thanks in advance

Parents
  • Thanks Edvin for your quick response.

    You can use radio notifications to know up front before every radio event, but not in the detail like you describe, unfortunately. Is there a particular reason why you need this?

    I want to implement a watchdog timer for every ISR routine/event handler. For example, during scanning, around 60us is spent while preparing the radio. If I had the notification before and after this, it would be easer for me to know when to kick the dog. 

    so if you could enlighten me, that would be great. And what do you mean by error rate? Do you mean accuracy?

    For example, consider my sampling reference is 1V. Now, my ADC can have read 0.98 and 1.02V and adjust it's offset accordingly but if my reference is 0V, the SAADC can't read -0.02V. Or will the ADC value read be in 2's complement or am I missing some basic concept here. Can the SAADC read negative voltage?

    And yes, by error rate, I mean accuracy. Sorry for not being clear the last time around.

    Thanks a Lot and Cheers

Reply
  • Thanks Edvin for your quick response.

    You can use radio notifications to know up front before every radio event, but not in the detail like you describe, unfortunately. Is there a particular reason why you need this?

    I want to implement a watchdog timer for every ISR routine/event handler. For example, during scanning, around 60us is spent while preparing the radio. If I had the notification before and after this, it would be easer for me to know when to kick the dog. 

    so if you could enlighten me, that would be great. And what do you mean by error rate? Do you mean accuracy?

    For example, consider my sampling reference is 1V. Now, my ADC can have read 0.98 and 1.02V and adjust it's offset accordingly but if my reference is 0V, the SAADC can't read -0.02V. Or will the ADC value read be in 2's complement or am I missing some basic concept here. Can the SAADC read negative voltage?

    And yes, by error rate, I mean accuracy. Sorry for not being clear the last time around.

    Thanks a Lot and Cheers

Children
  • Charan said:
    Can the SAADC read negative voltage?

     Yes. But only small values (not intended for reading negative voltages using the ADC. Only intended for calibration). 

     

    Charan said:
    I want to implement a watchdog timer for every ISR routine/event handler. For example, during scanning, around 60us is spent while preparing the radio. If I had the notification before and after this, it would be easer for me to know when to kick the dog. 

     Ok. As I said, you can use radio notifications to know up front any radio events that will occur. Unfortunately, these events doesn't say whether it is a scan window or something else that is about to happen, and you don't get an event when the scan window is complete. I guess you must rely on other events to feed the watchdog. 

    Best regards,

    Edvin

Related