Skip to main content
Associate III
December 16, 2024
Question

Custom board works on USB power; not on other power supply.

 

 

 uint32_t currentTime1 = HAL_GetTick();

	 // Her 1000 ms'de bir işlem yap
	 if (currentTime1 - lastTime >= 500)
	 {
	 HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_14); // LED'i toggla
	 lastTime = currentTime1; // Son işlem zamanını güncelle
	 }

 

 

"I am using an STM32F100 MCU in my own PCB design. When I run it through the computer's USB, the LED toggles. However, when I power it with an external power supply, the LED just turns on and doesn't toggle afterward. I have no idea what could be causing this. Could you help me with what I should check?"

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
December 16, 2024

Check state of BOOTx pins.

Check VDD and VDDA, check state of NRST

Have output via UART or other GPIO or LEDs if you end up in Error_Handler or HardFault_Handler. 

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
XooMAuthor
Associate III
December 16, 2024

"When I power the system through the USB port, the LED toggles. However, when I apply external voltage without disconnecting the USB, the LED stops toggling. Could the points you mentioned still be relevant to this issue?

Andrew Neil
Super User
December 16, 2024

@XooM wrote:

my own PCB design


Show your schematic.

Give details of the "external power supply" - have you verified that it gives a good, steady output?

 

 


@XooM wrote:

when I power it with an external power supply, the LED just turns on and doesn't toggle afterward


In that state, can you use the debugger?

 

PS:

Have you reviewed your custom board design against Application note AN2586, Getting started with STM32F10xxx hardware development:

Getting started with STM32F10xxx hardware development - undefined

 

Also check against ST board designs (Discovery, Nucleo, et al)

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.