2017-08-27 03:38 PM
I am trying to configure the STM32L432KC LPUART1, USART1, and USART2 peripherals for concurrent use. I have gone over the pin AF options multiple times and keep coming up with the same conclusion. That the LPUART1 and USART2 TX pin is shared between the two and cannot be re-mapped elsewhere.
That is odd is that the USART2 RX pin can be remapped to free the LPUART1 RX pin, but not the TX pin.
Further oddness : There is an entire column in the AF table dedicated to the USART2 and yet only a single entry is shown (RX remap).
Further oddness-II : The table also indicates a USART3 option for cat-3 devices, but only shows some of the pin functions and omits entirely the RX and RX pins.
At this point, I suspect that the datasheet is incorrect and the table is missing the entries to re-map USART2 alternate pins.
Otherwise, only two of the three UARTS can be used at the same time.
Anybody seen this before? Perhaps can give me some insight as to whether it is a hardware limitation or datasheet error?
Cheers!
Daniel
2017-08-27 04:18 PM
Hello!!
According to the DS USART2_TX, LPUART1_TX are both assigned as AF to PA2 only and not have alternative pins.
So it is imposible to have LPUART1 and USART2 both in (at least) TX mode.
'Anybody seen this before?' -> Yes . It is common not used all functions simultaneously especialy in chips with not much external pins.
In a more expensive and with more pins MCU, e.g. STM32L452RCT you can use simultaneously not only 3 ser ports but four. (two pins per port.)
2017-08-27 04:47 PM
The same die is likely usable in multiple packages, you've chose one of the most restrictive ones, and consequently limited your options. I'd agree that the USART3 references seem extraneous, I'd suppose it might be in there, but PC4/5 and PB10/11 don't escape.
An RX only USART might be sufficient for say a GPS receiver, a TX could be muxed to multiple peripherals with different baud rates