2020-01-24 05:02 PM
Hi,
i designed a board with a STM32F030 and already flashed and debugged it with success. However i used a Nucleo Board in order to flash it and I cannot connect to the target anymore. I also want to mention that i used the regular ST-LINK V2 as well. I already tried to power the target, while bridging BOOT0 to +3V3 and I also tried to erase the memory with ST-Util. In fact nothing works (OpenOCD, ST-UTIL, texane st-util Command Line Tool...). I already checked some threads with similar problems, however I couldn't find a solution so far. Has anyone else had a problem like this?
2020-01-24 05:20 PM
Try accessing the system boot loader via the serial port.
What does your code actually do that could break this? Go into low power modes, reconfigure GPIOA pins, disable debug?
2020-01-24 11:41 PM
Wow, thank you for the quick response. I will try that later. I wonder if the initialization of the HSE is the trigger, since i‘m providing a Clock Signal to GPIOF.
rcc_osc_on(RCC_HSI);
rcc_wait_for_osc_ready(RCC_HSI);
rcc_set_sysclk_source(RCC_HSI);
rcc_set_hpre(RCC_CFGR_HPRE_NODIV);
rcc_set_ppre(RCC_CFGR_PPRE_NODIV);
flash_prefetch_enable(); flash_set_ws(FLASH_ACR_LATENCY_000_024MHZ);
rcc_periph_clock_enable(RCC_GPIOF);
rcc_osc_on(RCC_HSE);
rcc_wait_for_osc_ready(RCC_HSE);
rcc_set_sysclk_source(RCC_HSE);
rcc_ahb_frequency = 16000000;
rcc_apb1_frequency = 16000000;
rcc_apb2_frequency = 16000000;
rcc_periph_clock_enable(RCC_GPIOA);
rcc_periph_clock_enable(RCC_GPIOB);
rcc_periph_clock_enable(RCC_ADC);
rcc_periph_clock_enable(RCC_SYSCFG_COMP);
rcc_periph_clock_enable(RCC_I2C1);
rcc_set_i2c_clock_hsi(I2C1);
2020-01-25 12:22 AM
Try connecting with the reset signal active (low) while connecting to the board, then release reset immediately when the debugger connects. Might require a few tries, but it should eventually work.
2020-01-25 07:47 AM
I tried accessing the bootloader, but without any success.
I bridged BOOT0 to +3V3, then I pressed the Reset Button - Is there a step missing?
However, refering to the bootloader manual, there is a given configuration for the bootloader over USART1 on PA14/PA15 or PA9/PA10. The USART1 of the STM32F030K6 is on PA2/PA3 - https://www.st.com/content/ccc/resource/technical/document/application_note/b9/9b/16/3a/12/1e/40/0c/CD00167594.pdf/files/CD00167594.pdf/jcr:content/translations/en.CD00167594.pdf
I used the Flash Loader Demonstrator or HTerm, in order to send the commands
2020-01-25 09:30 AM
Your problem is probabbly hardware related. You dont have 10k resistor nrst-vcc. In this case programming under reset should work - connect reset from st link to nrst.
2020-01-25 03:34 PM
@oeliks The uC has an Internat Pull up Resistor, however i try it tomorrow, thank you.
2020-01-25 10:59 PM
USART1 can be mapped to PA2/PA3, PA14/PA15, PA9/PA10, or PB6/PB7. Of these, the bootloader is monitoring only PA10 and PA15 for commands. It doesn't matter which possible mapping is used in the application, because it isn't running at all.