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 Reply Children
  • That seems to have fixed it. I can now debug my code again. Thank you for pointing me to the answer.

  • SHANNON can you tell me how you debug your code SDK 10because am facing this eror ..........\components\drivers_nrf\uart\nrf_drv_uart.c(74): error: #20: identifier "UART0_CONFIG_PSEL_RXD" is undefined

    ..........\components\drivers_nrf\uart\nrf_drv_uart.c(74): error: #20: identifier "UART0_CONFIG_PSEL_CTS" is undefined

    even though enabling the UART0in the nrf_drv_config.h file

  • 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.

  • Thank you for your kind reply i added the nrf_drv_config into my location under nrf_drivers folders along with that #if (UART0_ENABLED == 1) i modified thos also but after compilations till showing the same error it is showing all those functions are undefined only i dont understand why it is not recognizing that linked file

  • I used that BSP example UART it is wprking fine and i did the same configuration for the PWM exmaple and then am trying to add the UART terminal for that it is showing these kind of issues i dont understand why and i blocked

Related