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

trying BLE and ESB parallel - SWI0 and radio

Hi, I'm trying to run ESB during the timeslot api requested slots. The problem is that BLE uses app_timer, which uses SWI0 for the callbacks, and at the same time, ESB also uses SWI0. As soon as I compiled the code, no surprise, it complains that there is a redefinition for the SWI0 ISRoutine.

._build\ble_app_hrs.axf: Error: L6200E: Symbol SWI0_IRQHandler multiply defined (by nrf_notification_manager.o and app_timer.o).

Is there any chance to make ESB use another method ( for callbacks I presume...) than SWI0?

Very much appreciated for the help.

P.S.: Not sure if this could actually work, once I have a feeling that re configuring the radio for the ESB might mess up the BLE work. If This is the case, please advise.

  • You can redefine which interrupt to be used by the ESB, that's not a problem. Just make sure it's given the highest priority during the timeslot event. You can't have ESB and BLE running at exactly the same time, so you can only use ESB inside the time slots that you are assigned.

  • Thank you!!!

    I've tried to do just that, but then again BLE uses all the SWIs except one according to the docs, therefore if you use the app_timer, no SWI is left to be used. But Even if you ignore this and try just to configure another SWI in the ESB lib constants h file, the error is exactly the same, which leads me to thing that at some point I'm using the wrong header file to configure this or someone hard coded the SWI0 handler as default without using a selection from the constants. Still this is just a long shot hunch given the compiler return is no different changing the ESB to a different SWI or not.

    At the moment I'm trying to use uESB once it uses no SWIs and I can build my own event handler. As soon as this works the problem will be understanding if by the end of the given time slot, the BLE will or won't reconfigure the radio to the needs, or will just fail.

    Thank you!!

  • Are you using Radio Notification? If not, you can re-use the SWI setup towards Radio Notification. I'm not sure if you have had a look at the code examples showing usage of S110 with ESB/Proprietary radio in time slots: github.com/.../nRF51-multi-role-conn-observer-advertiser

    If you don't hand control over to the BLE softdevice at the end of the time slot, the BLE connection will fail. You will drop the link, but the application shouldn't fail. You could do a re-connect. This isn't recommended, you should disconnect and disable the Softdevice if you think that you have to use more than what you are give as time slots.

  • I found an alternate library (app_timer_ble_gzll.c) in the SDK that seems to overcome this issue.

    1. From the Keil uVision, select Project->Manage->Run-Time Environment.

    2. Select and expand "nRF_Libraries", and then "app_timer".

    3. Then change the Variant from "default" to "Gzll", and OK it.

Related