Menu

#160 Problem with /dev/ttyS0 on Pi 4B+

0.7
New
nobody
None
Medium
Defect
2024-05-11
2023-09-21
No

I am unable to get anywhere as it always fails the "termios settings" check. The failure is that c_cflag comes back 0x1cb1 when the program is trying to set it to 0x1db1. Am investigating...

Discussion

  • Dave Pfaltzgraff

    The problem is that /dev/ttyS0 on the Raspberry Pi does not support parity. So, the value returned after tying to set termios is correct. Will need to work up support for one of the other UARTs on the Pi. Looks like UART4 (/dev/ttyAMA3) will work for me.

     
  • Trent Piepho

    Trent Piepho - 2023-09-26

    Another option is to disable bluetooth (dtoverlay=disable-bt), then the primary uart on /dev/serial0 changes from the mini-UART (ttyS0) to the PL011 UART (ttyAMA0) previously used for BT-HCI, which does work for stm32flash.

    So it's possible to get stm32flash working on the same pins without using another UART, if you can give up BT.

     
  • Dave Pfaltzgraff

    I had seen that suggestion elsewhere, but we anticipate using the BT capability later in this project. Thanks for the suggestion.4

    I have been able to get UART4 to work on the new pins.

     
  • Tormod Volden

    Tormod Volden - 2024-05-11

    I have just added some RPi info to the Hints section in the wiki, based on another report. Since it mentions dtoverlay=miniuart-bt I think it allows using BT (but no serial console). Please let me know how that works, or if the wiki entry can be improved.

     

Anonymous
Anonymous

Add attachments
Cancel