Forum Replies Created
-
AuthorPosts
-
December 27, 2019 at 11:00 in reply to: Clock from CubeMX not applied in VisualGDB on stm32f446 #26947ArtemParticipant
I have modified stm32f4x.cfg from openocd and commented of the following lines. It seems to work now.
Is there any better solution for this?
$_TARGETNAME configure -event reset-init {
# Configure PLL to boost clock to HSI x 4 (64 MHz)
#mww 0x40023804 0x08012008 ;# RCC_PLLCFGR 16 Mhz /8 (M) * 128 (N) /4(P)
#mww 0x40023C00 0x00000102 ;# FLASH_ACR = PRFTBE | 2(Latency)
#mmw 0x40023800 0x01000000 0 ;# RCC_CR |= PLLON
#sleep 10 ;# Wait for PLL to lock
#mmw 0x40023808 0x00001000 0 ;# RCC_CFGR |= RCC_CFGR_PPRE1_DIV2
#mmw 0x40023808 0x00000002 0 ;# RCC_CFGR |= RCC_CFGR_SW_PLL# Boost JTAG frequency
#adapter_khz 8000
adapter_khz 2000December 27, 2019 at 10:09 in reply to: Clock from CubeMX not applied in VisualGDB on stm32f446 #26946ArtemParticipantOk, I got a little further: The problem only arises when executing the code via VisualGDB debugger with STLink. When the system starts after applying power all clocks are correct.
December 27, 2019 at 09:45 in reply to: Clock from CubeMX not applied in VisualGDB on stm32f446 #26945ArtemParticipantHow can I replace the VisualGDB generated startup_stm32f446xx.c with the CubeMX generated startup_stm32f446xx.s ?
December 27, 2019 at 01:42 in reply to: Clock from CubeMX not applied in VisualGDB on stm32f446 #26944ArtemParticipantYeh, I will do some more debugging tomorrow. For now I have the feeling that the CPU is not reset correctly and the clocks are preset by the bootloader or so and can not be changed by the application…
December 27, 2019 at 01:22 in reply to: Clock from CubeMX not applied in VisualGDB on stm32f446 #26942ArtemParticipantHi,
yes, this is is a standard CubeMX code generation. Actually nothing special. So SystemClock_Config() is there and is being executed. However the settings made there are not applied when compiling with VisualGDB. When compiling the same project using uVision everything works as expected. What can be the difference? Maybe there are some startup files different?
ArtemParticipantUpdate2: It works fine with the latest Segger J-Link software. Thanks.
ArtemParticipantUpdate: I just saw that Segger has listed the G0 as supported on their website. I will need to try if this works.
ArtemParticipantOk, thank for the info and the guide. I will try the first workaround and build a local OpenOCD.
The Segger J-Link also does not support the STM32G0 family yet.
ArtemParticipantHello,
yes, I have an active license. Please try if you can include them, as the STM32G0 are not usable with VisualGDB right now.
-
AuthorPosts