stm32duino / Arduino_Core_STM32

STM32 core support for Arduino
https://github.com/stm32duino/Arduino_Core_STM32/wiki
Other
2.85k stars 979 forks source link

STM32F030K6 variant issue #2486

Closed aliihsanhavan closed 3 months ago

aliihsanhavan commented 3 months ago

Can't program STM32F030K6T6 with default variant setup to execute code. Although I tried to create variant myself by using CubeMX, it still doesn't execute code. IDE shows it has been succesfuly programmed but code doesn't execute. When try to connect again, it requires RESET operation.

When PLL is OFF, no issue but MCU runs only at 8Mhz. When PLL is on and try to achieve 48Mhz, it doesn't work.

I have similar custom board with STM32F103RCT, it works very well. There is only problem with STM32F030K6T.

HardwareSerial mySerial(PA_10, PA_9);

void setup() {

    mySerial.begin(9600);

}

void loop() {

  mySerial.println(F_CPU);
  delay(250);

}

Steps to reproduce the behavior:

  1. Plug any STM32F030K6T6 MCU
  2. Try to program it with existing variant setup without changing anything. Simple Blink code or Serial print
  3. No exceution. MCU gets bricked and RESET has to be followed in order to program it further.

    • OS: Windows 10
    • Arduino IDE version: 2.3.2
    • STM32 core version: 2.8.1
    • Tools menu settings if not the default: Default
    • Upload method: SWD

Board (please complete the following information):

fpistm commented 3 months ago

Hi @aliihsanhavan I've tested and had no issue with the PPL ON and SYSCLK at 18 MHz. It works as expected. Don't know you hardware but you probably get an issue with it.