STM32L031K6 not outputting to serial terminal
Hi STM community,
I’m working on a project with an STM32L031K6 paired with a Fujitsu FRAM MB85RC256V and an SHT31-D temperature/humidity sensor (on a breakout board). Both peripherals are on the I²C bus PB7 = SDA, PB6 = SCL.
I’m trying to test the setup using Tera Term, but I’m not seeing any UART output at all — even though I’ve added print statements. No text appears on the terminal.
Here’s what I’ve tried so far:
1. Verified that my code reaches the print statements; I added edge cases and test prints.
2. Confirmed my pinout configuration: PB7 → SDA, PB6 → SCL with pull-up resistors connected to 3v3 rail.
3. Enabled USART2 with TX = PA2, RX = PA15, and ensured the global interrupt is enabled with priority 0.
4. Enabled I²C communication.
Despite these steps, I’m still not getting any serial output.
Has anyone encountered a similar issue on the Nucleo-L031K6 where USART2 over the ST-Link Virtual COM Port does not show output in Tera Term? Any suggestions or troubleshooting steps would be greatly appreciated — I’ve been stuck on this and can’t seem to figure it out.
Thanks in advance!
