Hello Nordic Team
I am using SDK 3.0.1 with a nRF52DK to develop a firmware that can be switched from BLE mode to GAZELL mode and vice versa over a command sent via UART port.
My project works good in GAZELL mode, but BLE is not working.
With the help of this article RE: Gazelle and BLE I found out that if I comment out the following lines in gzll_glue.c, the BLE part is also working correctly.
IRQ_DIRECT_CONNECT(GAZELL_TIMER_IRQN,
CONFIG_GAZELL_HIGH_IRQ_PRIO,
gazell_timer_irq_handler,
GAZELL_HIGH_IRQ_FLAGS);
IRQ_DIRECT_CONNECT(RADIO_IRQn,
CONFIG_GAZELL_HIGH_IRQ_PRIO,
gazell_radio_irq_handler,
GAZELL_HIGH_IRQ_FLAGS);
And with the help of this article RE: Gazelle and BLERE: Gazelle and BLE I changed the 2 gzll_glue.c lines with following code:
ARM_IRQ_DIRECT_DYNAMIC_CONNECT(GAZELL_SWI_IRQN, CONFIG_GAZELL_LOW_IRQ_PRIO, 0, reschedule);
ARM_IRQ_DIRECT_DYNAMIC_CONNECT(GAZELL_TIMER_IRQN, CONFIG_GAZELL_HIGH_IRQ_PRIO, 0, reschedule);
ARM_IRQ_DIRECT_DYNAMIC_CONNECT(RADIO_IRQn, CONFIG_GAZELL_HIGH_IRQ_PRIO, 0, reschedule);
irq_connect_dynamic(GAZELL_SWI_IRQN, CONFIG_GAZELL_LOW_IRQ_PRIO, gazell_swi_irq_handler, NULL, 0);
irq_connect_dynamic(GAZELL_TIMER_IRQN, CONFIG_GAZELL_HIGH_IRQ_PRIO, gazell_timer_irq_handler, NULL, GAZELL_HIGH_IRQ_FLAGS);
irq_connect_dynamic(RADIO_IRQn, CONFIG_GAZELL_HIGH_IRQ_PRIO, gazell_radio_irq_handler, NULL, GAZELL_HIGH_IRQ_FLAGS);
Also here everything is fine in GAZELL mode, but doesn't work in BLE mode. If I comment out the 3 last line of code BLE work fine.
Please note that if in BLE mode the methode gzll_glue_init is not called.
So how to connect really dynamicaly to irq's ?
What am I missing ?
Best Regards