Hi,
I'm developing a peripheral driver which involves UART. I encounter an issue I'm not sure how to proceed.
In my design, I have
main.c
device_drv.c
device_drv.h
uart_drv.c
uart_dev.h
device_drv.c calls nordic uart driver wrapped in uart_drv.c. For most of the time, everything works. However, I'll get a buffer overrun error if I instantiate a timer in device_drv.c, and send UART frames in the timer handler. I tried to increase the UART priority in sdk_config.h to 3, and the issue goes away. I later move the timer handler to main.c, and the same issue appears. But If I put the piece of code in while (1), the issue disappeared.
I'm pulling my hair out.
Ideas?
Thanks,
Ye-Sheng