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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-02 12:40 AM
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)
- Labels:
-
STM32CubeMX
-
STM32L0 Series
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-09-04 06:40 AM
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.
- « Previous
-
- 1
- 2
- Next »