Hi all!
I have a custom board using USART4, but it seems that my code is unable to get the data from the connected device.
I used a scope, and a TTL/USB converter to the chip (PC gnd & Rx ← → gnd Tx board) and see the correct output.
I attempted to add:
[env:nucleo_l073rz]
platform = ststm32
board = nucleo_l073rz
framework = arduino
build_flags =
-DSTM32_ENABLE_USART4
To my build flags but no luck. has anyone got USART4 working?
Can you link to the code that checks for this flag? I don’t find any results. There is howerver ENABLE_HWSERIAL4 which enables Serial4, mapping to USART4, to be used.
You also didn’t show the Arduino code you’re running, so it’s hard to say whether there’s a fault there.
In theory, using the platformio.ini will make Serial4 work with TX = PA0, RX = PA1. (Note: The only other valid USART4 pins are PC10, PC11, in alternate pin mapping configurations, per PeripheralPins.c. Also see mbedos).