would the external interrupt break the BLUE interrupt ?

6 posts / 0 new
Last post
liyang
Offline
Last seen:3 months 1 week ago
Expert
加入:2014-09-24 11:51
would the external interrupt break the BLUE interrupt ?

Hi,dialog

Now,I use a external interrupt . I am worry about this external interrupt will break the BLUE event. will it ?

Thanks liyang.

Device:
MT_dialog
Offline
Last seen:3 hours 27 min ago
Staff
加入:2015-06-08 11:34
Hi liyang,

Hi liyang,

不,即使在sa中断发生me time with a BLE interrupt the da will serve the BLE event first since the BLE interrupts have bigger priority, and then the external interrupt will be served.

Thanks MT_dialog

liyang
Offline
Last seen:3 months 1 week ago
Expert
加入:2014-09-24 11:51
Hi,Dialog

Hi,Dialog

I use the NVIC_SetPriority() set the external interrupt priority. Even the priority is set 1 (second param ), the BLE interrupt always have bigger priority?

Thanks liyang.

MT_dialog
Offline
Last seen:3 hours 27 min ago
Staff
加入:2015-06-08 11:34
Hi liyang,

Hi liyang,

The thing about setting the external interrupt at the same priority with the BLE event is that if the BLE event occurs while the external interrupt is executing the BLE event will execute eventually but it will be delayed. Now, if the BLE event is delayed you will probably miss the connection , if there is one, since the device will miss the ancor point with the host. So setting the external event in the same priority with the BLE events isn't such a good idea.

Thanks MT_dialog

liyang
Offline
Last seen:3 months 1 week ago
Expert
加入:2014-09-24 11:51
Hi,Dialog

Hi,Dialog

As you say, the BLE event interrupt priority is 1,so,I should set the priority of the external interrupt to 2 or 3 ?

Thanks liyang.

MT_dialog
Offline
Last seen:3 hours 27 min ago
Staff
加入:2015-06-08 11:34
Hi liyang,

Hi liyang,

Yes, that should do the trick. Just set your interrupts in lower priority than the BLE IRQs priority.

Thanks MT_dialog