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.

  • 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

  • make sure your include folders only have one nrf_drv_config.h file, as it has include blocks it won't include more than one copy. I think in the SDK it is located in ..../components\drivers_nrf\config, so if you have a copy elsewhare (say in your project folder), it could be included from there first.

  • A good way to know if the nrf_drv_config.h file is the one you think you are using is, if you make a change to the file, even just save it, and do a compile (not a full make) only the files that have been modified will compile, and since the nrf_drv_config.h file is included in a lot of .c files, quite a number will recompile. if none do. then you know the one included is not the one you think it is.

    I hope this helps.

  • i ahve one question in the SDK version 10 BSP exmaples using the UART terminal but nowhere in thedrivers or library folder mentioned it having nrv_drv_config.h so how does that file got linked tot he app_uart_fifo.c/nrf_drv_config.c can you please tell me if you know about this or if you have any idea about this

  • In your project file, there is compiler include folders, these will allow the compiler to pull in any file that is in "#include"ed for from these folders, for instance ../../../components/drivers_nrf/config This should be available some place from within your IDE to modify or add them. Because I'm using Crossworks, and I haven't used Keil I'm not sure where it would be in there. I have used IAR, but I don't have it at my current location. so you may want to consult your compilers documentation to find where to change your include folders. you could in your main.c file define these 2 variables, they are just defaults, in case you don't define them properly in your uart0_init call.

Related