cancel
Showing results for 
Search instead for 
Did you mean: 

Powering STM32 Blue pill through external source via micro USB

Mshar.2
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
gbm
Lead III

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

View solution in original post

2 REPLIES 2
gbm
Lead III

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

Hello @gbm​ , thank you