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

what nvic_priority should i set?

hi,all!

i am confused about whicn priority should i set for my interrupt.

For deteils, I need a gpioe interrupt for my button, and this button is used to POWER OFF my device(using system_of_mode_enter();), so which priority should i choose?

By the way, why i would get this confusion is because i read the character "Exception (interrupt) management with a SoftDevicenrf" in the "51_reference_manual" page 170. According to what it said, the priority 0 is prepared for the LowerStack so i not sure if my priority also set to 0 will cause some problem or not.

Looking forward for your reply, thank you very much!

Parents
  • Hi,

    The softdevice uses interrupt priority level 0 and 2. Levels 1 and 3 are then available for your application.

    If you try to set your interrupt priority to the same as the softdevice, you will get an assert.

    Best regards Håkon

  • thank you for your fast reply! By the way, as my interrupt is to power off the device,so if I set the priority to 1, will there be possible that I power off the device while my code is in the softdevice interrupt which set priority to 2 and then cause some unknown error? looking forward to your reply!

Reply
  • thank you for your fast reply! By the way, as my interrupt is to power off the device,so if I set the priority to 1, will there be possible that I power off the device while my code is in the softdevice interrupt which set priority to 2 and then cause some unknown error? looking forward to your reply!

Children
No Data