phoenix-rtos / phoenix-rtos-project

Sample project using Phoenix-RTOS
https://phoenix-rtos.com
BSD 3-Clause "New" or "Revised" License
43 stars 32 forks source link

stm32l4 - uart communication cannot process continuous data fast enough #235

Open niewim19 opened 2 years ago

niewim19 commented 2 years ago

stm32l4 UART communication cannot process continuous block of data fast enough. This bug blocks history usage in psh and forces STM32L4Runner in phoenix-rtos-tests to use strange looking 30ms delay after each character (cutting baudrate from 115200 to 333)

Everything is fine when a real human types communicates with target (e.g with picocom) but using some script that sends data without human-related delays (times between character strikes) breaks the communication and target misses some characters (as they would never arrive via UART)

Replication:

Also because of this the functionality of psh history is broken as pressing up key on keyboard (in psh) prints letter A which means that only half of the whole message was processed correctly

anglov commented 9 months ago

@damianloew As DMA UART was merged please do the following steps:

  1. Enable DMA on default console UART via board_config.h
  2. Run tests (CI should do relevant test and all of them should pass)
  3. Remove workaround in phoenix-rtos-tests https://github.com/phoenix-rtos/phoenix-rtos-tests/blob/6cd0ac76475196a268db2fe95b6f735c97e6b2b2/trunner/target/armv7m4.py#L104C1-L108C1
  4. Run tests.

If everything will pass, then this issue can be closed.