不,即使在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.
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?
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.
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
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.
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
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.
Hi liyang,
Yes, that should do the trick. Just set your interrupts in lower priority than the BLE IRQs priority.
Thanks MT_dialog