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

How to know whether softdevice interrupt occur in higher interrupt routine

Hi

I have asked some question about 2 weeks ago.

And I have a additional question about softdevice interrupt.

VSYNC interrupt is occurring every 200ms in my project.

If softdevice interrupt is occurring during VSYNC interrupt, I throw that frame away,

And if softdevice interrupt has not occurred during VSYNC interrupt, I will send that frame to central.

Is it possible?

In other words, can I know that softdevice interrupt has occurred during VSYNC interrupt?

Best regards,

Parents
  • Hi,

    If I understand you correctly you are getting video input, and you want to know if the video image that you have captured is correct or if it contains errors (because the SoftDevice interfered with some timing related to the capture). Your plan is to keep all the correct video frames, and to discard any frames that contains errors.

    After a short discussion with a colleague we came up with the following suggestion: We assume that you know how long the VSYNC interrupt should last, and that a longer lasting VSYNC interrupt indicates an erroneous frame. You can use PPI to start a timer on the VSYNC signal (as well as triggering the interrupt). When you stop the timer (at the end of the VSYNC interrupt) you will see if the SoftDevice has interrupted by checking the time passed. This would require one GPIOTE, one PPI and one TIMER.

    If the above is not a satisfactory solution then you may have a look at radio notifications. This would give you interrupts prior to SoftDevice runs, which would let you keep track of when SoftDevice operation will happen.

    In any case you should make sure that SoftDevice activity such as advertising, scanning and connection events are held to a minimum. Connection interval should be held high, to minimise SoftDevice interrupts.

    Regards, Terje

Reply
  • Hi,

    If I understand you correctly you are getting video input, and you want to know if the video image that you have captured is correct or if it contains errors (because the SoftDevice interfered with some timing related to the capture). Your plan is to keep all the correct video frames, and to discard any frames that contains errors.

    After a short discussion with a colleague we came up with the following suggestion: We assume that you know how long the VSYNC interrupt should last, and that a longer lasting VSYNC interrupt indicates an erroneous frame. You can use PPI to start a timer on the VSYNC signal (as well as triggering the interrupt). When you stop the timer (at the end of the VSYNC interrupt) you will see if the SoftDevice has interrupted by checking the time passed. This would require one GPIOTE, one PPI and one TIMER.

    If the above is not a satisfactory solution then you may have a look at radio notifications. This would give you interrupts prior to SoftDevice runs, which would let you keep track of when SoftDevice operation will happen.

    In any case you should make sure that SoftDevice activity such as advertising, scanning and connection events are held to a minimum. Connection interval should be held high, to minimise SoftDevice interrupts.

    Regards, Terje

Children
No Data
Related