Wooohaaa opened a new pull request, #21892:
URL: https://github.com/apache/nuttx/pull/21892

   ## Summary
   
   `stm32serial_setformat()` in `stm32_serial_m0_v3.c` (used by F0 boards
   such as nucleo-f072rb) writes the parity and word-length bits in CR1
   (PCE, PS, M0/M1) with UE = 1. On USART v2 and later, these bits can
   only be written while UE = 0, so `tcsetattr(8E1)` returns 0 but the
   parity and word length do not change.
   
   ## Change
   
   - `arch/arm/src/common/stm32/stm32_serial_m0_v3.c`: enter a critical
     section, save and clear UE before configuring the format bits, then
     restore UE. Follows the pattern from the L4 (#20914) and WB (#21334)
     drivers.
   
   ## Test plan
   
   - Built `nucleo-f072rb:nsh` with arm-none-eabi-gcc; the serial driver
     compiles cleanly.
   - Not tested on hardware (no F0 board available).
   - The change is gated on `CONFIG_SUPPRESS_UART_CONFIG` being undefined,
     matching the existing code.
   
   Fixes #20969
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to