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

How can I use "Esb" and "App timer" at the same time?

Hi,

I an try to use "Esb function" and "App timer function (app_timer_create() and app_timer_start()" in the same project, but there have one following link error message.

.\_build\nrf52832_xxaa.axf: Error: L6200E: Symbol SWI0_EGU0_IRQHandler multiply defined (by nrf_esb.o and app_timer.o).

How can I solve this problem.

Thank you,

Chianglin

Parents
  • Hi Ives

    You can change the software interrupt handler used in nrf_esb.h, to avoid the conflict with the app timer library. 

    A common trick is to hijack the interrupt vector off a peripheral that you don't need in the application, to avoid using all the software interrupts. 

    As an example, the QDEC peripheral is very specialized and is usually not required by the application. If this is the case for you also just change lines 137-138 in nrf_esb.h as such:

    #define ESB_EVT_IRQ QDEC_IRQn //!< The ESB event IRQ number when running on an nRF5 device.
    #define ESB_EVT_IRQHandler QDEC_IRQHandler //!< The handler for @ref ESB_EVT_IRQ when running on an nRF5 device.

    Best regards
    Torbjørn

  • Hi Torbjørn,

    Thank you for your answer.

    Please reference the attach file.

    I am trying to create timer to trigger task "RxPacketProcess_timeout_handler()", which can print a message "(0001)" via UART interface every two seconds.

    But, it can not print "(0001)" message to my PC via UART interface.

    Would you please tell me how to modify it?

    Code.7z

    Thank you,

    Chianglin

  • Hi Torbjørn,

    1. My project is '.\nRF5_SDK_15.2.0_9412b96\examples\proprietary_rf\NordicCode\ptx\pca10040\blank\arm5_no_packs\esb_ptx_pca10040.uvprojx".

    2. About the problem of UART, UART can print debug message after I modify NRF_LOG_BACKEND_UART_TX_PIN define. Thank you,

    And I found some strange problem:

    1. After I download the binary code by press "load" button (please found following screen), the UART can not print any Debug message.

        Does it means the program doesn't execute?

    2. If I use"start / stop debug session" to execute in debug session ans exit then exit it (please find following screen",

        then the UART will start to print debug message.

    Wound you please tell me what the different between "direct download code into nRF52832 device" and "execute code in debug session mode"?

    Thank you,

    Chianglin

  • Hi Chianglin

    1. My bad. It seems the project didn't include the right header files, even though I changed the project settings. This should be corrected now:
    esb_template_app_timer_v2.zip

    2. Could you try to press the IF BOOT/RESET button on your DK after flashing from Keil?
    It is possible that it is not working because the chip is not being reset after the download. 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    Sorry for reply so late. Thank you for your kindly answer.

    I know the reason why nrf52832 device can not auto reset, it is because my segger JTAG interface is damaged.

    If I have some question about "switch ESB RF mode between PTX and PRX", do you suggest I ask you in this case, or create a new case?

    Thank you,

    Chianglin

  • Hi Chianglin

    If the question is not related to the app_timer discussion earlier I suggest you open a new case. 

    It is harder to keep track of cases when the threads get longer. 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    Thank you for your suggestion.

    Does NRF_LOG_DEBUG() function can only print message to PC via UART interface? Does "NRF_LOG_DEBUG()" can use with "APP_UART_FIFO_INIT()" function?

    Thank you,

    Chianglin

Reply Children
Related