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

UART Interrupts

Hi,

I'm trying to get the UART working, following the idea given in the Nordic Infocenter / nRF5 SDK Hardware Drivers / UART / Using the UART Driver.

I have downloaded the SDK and use "...\components\drivers_nrf\uart\nrf_drv_uart.c".

  • I understand the concept
  • the code compiles and links
  • When running the code I end up inside UARTE0_UART0_IRQHandler - which isn't implemented.

Here are my questions

  • I completely understand why I end up in the IRQHandler
  • However, I do not understand why none of the examples and the "nrf_drv_uart" drivers include a UARTE0_UART0_IRQHandler.
  • When I look at similar examples in GPIOTE / SPI they all include an interrupt handler
  • Am I missing something?

Any help is greatly appreciated

Matthias

Parents
  • SDK\components\device\nrf51_to_nrf52.h has a define that says

    #define UART0_IRQHandler        UARTE0_UART0_IRQHandler
    

    if you search for UART0_IRQHandler you will find it implemented in nrf_drv_uart.c

    The reason for this type of define is that the SDK team is now putting efforts to use same SDK for both nRF51 and nRF52. To make this possible drivers are trying to use same naming conventions even though the system vector table has different naming conventions to them.

    For your code not to jump into UARTE0_UART0_IRQHandler, you need to add nrf51_to_nrf52.h header file and also include the nrf_drv_uart module into your project.

    Hope this helps.

Reply
  • SDK\components\device\nrf51_to_nrf52.h has a define that says

    #define UART0_IRQHandler        UARTE0_UART0_IRQHandler
    

    if you search for UART0_IRQHandler you will find it implemented in nrf_drv_uart.c

    The reason for this type of define is that the SDK team is now putting efforts to use same SDK for both nRF51 and nRF52. To make this possible drivers are trying to use same naming conventions even though the system vector table has different naming conventions to them.

    For your code not to jump into UARTE0_UART0_IRQHandler, you need to add nrf51_to_nrf52.h header file and also include the nrf_drv_uart module into your project.

    Hope this helps.

Children