2024-12-16 2:05 AM - last edited on 2024-12-16 3:16 AM by Andrew Neil
 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?"
2024-12-16 2:52 AM
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.
2024-12-16 2:56 AM - edited 2024-12-16 2:58 AM
"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?
2024-12-16 3:14 AM - edited 2024-12-16 3:35 AM
@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)
