Skip to main content
Mshar.2
Associate II
February 1, 2023
Solved

Powering STM32 Blue pill through external source via micro USB

Hello, I've a strange problem and I can't find the answer on internet.

0693W00000Y9jo0QAB.pngI'm transmitting a data from UART2 of my STM32 Blue pill.

Its just one line :-

HAL_UART_Transmit(&huart2, (uint8_t*)Tx_msg, sizeof(Tx_msg), 100);

While using with ST-Link, it works.

When i connect micro usb from my laptop to Bluepill, it also works and transmits the data,

But when i connect micro usb from 5V charger/adapter to Bluepill, it doesn't work.

Bluepill is powered because LED is glowing but data isn't transmitted.

I tried with various chargers of different power, but it doesn't work.

Am i missing something?

This topic has been closed for replies.
gbm
gbmBest answer
Super User
February 1, 2023

Check the GND connection between the BluePill and whatever you transfer the data to.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

2 replies

gbm
gbmBest answer
Super User
February 1, 2023

Check the GND connection between the BluePill and whatever you transfer the data to.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Mshar.2
Mshar.2Author
Associate II
February 1, 2023

Hello @gbm​ , thank you