cancel
Showing results for 
Search instead for 
Did you mean: 

I'm using S32cubeMX to create a project for a stm32L010; on a proprietary board we connected a SPI ST mems to USART2. I have 2 questions 1) I can't select MSBFIRST bit using standard HAL drivers. 2) it seems USART2 tx/rx lines have an internal shortcut

AGasp.1446
Associate II

1) CubeMX create a usart type port, without opportunity to use UART_AdvFeatureConfig(); I implemented by myself the setting of MSBFIRST bit and works fine.

2) using USART2 in synchronous mode, on the read operation tx and rx lines are exactly equal and on both ones I get wrong voltage level on (using oscilloscope)

10 REPLIES 10
AGasp.1446
Associate II

what's wrong is RSR register; using a oscillosciope (LeCroy 600Mhz), on the second operation (rx) I see a try to send the correct code of the mems (0x11) with wrong voltage levels, depending on the value in TDR register; both USART2TX/RX have exactly the same behaviour, so even on tx I see the same waveform of rx.

Anyway thanks for your attention & time, I can't spend more time for this stuff as I'm not blocked on it.