This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UART and SDK 10

I have migrated a new project from SDK 9 to 10, and now I seem to be having issues.

I'm using the uart_fifo to read data from a GPS, so the data shows up every 1 Second.

I believe everything is going okay, until I put a breakpoint in and stop the code, I then get an overrun error, which I believe I've handled in my uart_callback function. by clearing the interrupt and event_error which the SDK should be doing already. The error seems to persist, and I cannot get any new data out of the hardware fifo.

In version 9 of the SDK there wasn't an issue with the error interrupt, the code would continue to run as if no problem occurred. Is this an issue with v9 or v10, which is now causing me problems.

and what do I need to do to ignore the over run error.

Parents
  • This may be a bug in the SDK similar to this. Try to change app_uart_fifo.c with this file: app_uart_fifo_mod.c (only added (void)nrf_drv_uart_rx(rx_buffer, 1); at line 65).

  • I believe this is defined in nrf_drv_config.h file. you need to define UART0_ENABLED = 1; (which I see you've already checked) Check your project, to make sure there is only one copy of the nrf_drv_config.h file. I had copied mine to a location that was easier to find, than where it's located in the SDK, and also linked it in my project. but when I upgraded my SDK to v10 it caused me some issues. make sure you're using the one or updated one from the SDK10 SDK Here is what Mine looks like

    #if (UART0_ENABLED == 1)
    #define UART0_CONFIG_HWFC         NRF_UART_HWFC_DISABLED
    #define UART0_CONFIG_PARITY       NRF_UART_PARITY_EXCLUDED
    #define UART0_CONFIG_BAUDRATE     NRF_UART_BAUDRATE_9600
    #define UART0_CONFIG_PSEL_TXD     0
    #define UART0_CONFIG_PSEL_RXD     0
    #define UART0_CONFIG_PSEL_CTS     0
    #define UART0_CONFIG_PSEL_RTS     0
    #define UART0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
    #ifdef NRF52
    #define UART0_CONFIG_USE_EASY_DMA false
    //Compile time flag
    #define UART_EASY_DMA_SUPPORT     1
    #define UART_LEGACY_SUPPORT       1
    #endif //NRF52
    #endif
    

    I am also using Crossworks v3.5.1, and I have copied most of the SDK to my own project locations. so I'm not using the SDK directly, but a modified copy of it (as in location not as in modified code, other than the fix)

    Hope that helps somewhat.

Reply
  • I believe this is defined in nrf_drv_config.h file. you need to define UART0_ENABLED = 1; (which I see you've already checked) Check your project, to make sure there is only one copy of the nrf_drv_config.h file. I had copied mine to a location that was easier to find, than where it's located in the SDK, and also linked it in my project. but when I upgraded my SDK to v10 it caused me some issues. make sure you're using the one or updated one from the SDK10 SDK Here is what Mine looks like

    #if (UART0_ENABLED == 1)
    #define UART0_CONFIG_HWFC         NRF_UART_HWFC_DISABLED
    #define UART0_CONFIG_PARITY       NRF_UART_PARITY_EXCLUDED
    #define UART0_CONFIG_BAUDRATE     NRF_UART_BAUDRATE_9600
    #define UART0_CONFIG_PSEL_TXD     0
    #define UART0_CONFIG_PSEL_RXD     0
    #define UART0_CONFIG_PSEL_CTS     0
    #define UART0_CONFIG_PSEL_RTS     0
    #define UART0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
    #ifdef NRF52
    #define UART0_CONFIG_USE_EASY_DMA false
    //Compile time flag
    #define UART_EASY_DMA_SUPPORT     1
    #define UART_LEGACY_SUPPORT       1
    #endif //NRF52
    #endif
    

    I am also using Crossworks v3.5.1, and I have copied most of the SDK to my own project locations. so I'm not using the SDK directly, but a modified copy of it (as in location not as in modified code, other than the fix)

    Hope that helps somewhat.

Children
No Data
Related