Skip to main content
Graduate II
December 16, 2024
Question

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

  • December 16, 2024
  • 2 replies
  • 762 views

 

 

 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.

    2 replies

    Graduate II
    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. 

    XooMAuthor
    Graduate II
    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?

    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 AN2586Getting started with STM32F10xxx hardware development:

    Getting started with STM32F10xxx hardware development - undefined

     

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