Uart Not working when i transmit and receive large packets of data(1024 bytes).

echo_bot.zip
I am working on UART send and receive application using Zephyr Interrupt driven UART APIs. The current baud rate is 921600 I want to send and receive data (approximately 4096 bytes). Currently I am able to send and receive only 512 bytes. In the code that I have attached here if I try with 1024 bytes, then the device does not boot. What is the maximum limit of bytes with this UART send and receive? How to make the application to send and receive 4096 bytes of data?

Parents
  • You cannot create a stack variable on main stack with size 1024 when the maximum stack available on your main thread is CONFIG_MAIN_STACK_SIZE = 1024. The tx_buff_1[1024] is spilling into other threads causing hardfaults at boot time. If you want to do it this way by having that static data in your main thread stack then set CONFIG_MAIN_STACK_SIZE=4096 in your prj.conf and this will fix the issue for you.

    Serial output then is

Reply
  • You cannot create a stack variable on main stack with size 1024 when the maximum stack available on your main thread is CONFIG_MAIN_STACK_SIZE = 1024. The tx_buff_1[1024] is spilling into other threads causing hardfaults at boot time. If you want to do it this way by having that static data in your main thread stack then set CONFIG_MAIN_STACK_SIZE=4096 in your prj.conf and this will fix the issue for you.

    Serial output then is

Children
Related