

While ((PWR->D3CR & (PWR_D3CR_VOSRDY)) != PWR_D3CR_VOSRDY) _HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1) * Configure the main internal regulator output voltage */ RCC_PeriphCLKInitTypeDef PeriphClkInitStruct So, in variant.cpp pertaining to my board I changed the old function WEAK void SystemClock_Config(void) we connect a digital clock signal instead of a crystal. The clock had to be configured to use HSE (High Speed External) oscillator set to bypass mode – i.e.

This clock is 8 MHz and is derived from a crystal.

Instead, I used STM32CubeMX and knowledge from this course (I highly recommend courses by this author) to configure the MCU to use external clock provided by the onboard STLink programmer. I could’ve tried to calibrate the oscillator, but I didn’t bother. The result was that the UART was 6% too slow. Even if I use STM32CubeProgrammer it can only connect with target if Reset mode is set to Hardware reset.It turns this Nucleo board version was configured in stm32duino to use I think the worst clock option, that is CSI, which is an internal 4 MHz RC oscillator. There is definitly something wrong with reset method. System.IO.FileNotFoundException: Could not find file 'C:\Users\info\AppData\Local\VisualGDB\EmbeddedDebugPackages\.st\share\openocd\scripts\target\stm32h7x_single_bank.cfg'.įile name: 'C:\Users\info\AppData\Local\VisualGDB\EmbeddedDebugPackages\.st\share\openocd\scripts\target\stm32h7x_single_bank.cfg'Īt System.IO._Error.WinIOError(Int32 errorCode, String maybeFullPath)Īt System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)Īt System.IO.FileStream.ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)Īt System.IO.StreamReader.ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)Īt System.IO.StreamReader.ctor(String path, Encoding encoding)Īt System.IO.File.InternalReadAllLines(String path, Encoding encoding)Īt System.IO.File.ReadAllLines(String path)Īt (IDebugStartService startService, DebugStartContext context)Īt VisualGDB.Common_.TestDebugConnection()Īt VisualGDB.Common_Click(Object sender, RoutedEventArgs e) I can not check OpenOCD ST fork becouse it gives notification that stm32h7x_single_bank.cfg is missing: Info : STLINK V3J9M3 (API v3) VID:PID 0483:3754Įrror: init mode failed (unable to connect to the target) The results might differ compared to plain JTAG/SWD Info : The selected transport took over low-level target control. Info : auto-selecting first available session transport "hla_swd". But if I manualy press/relese reset button on nucleo board then it pass TEST and can connect to MCU.Ĭ:\Users\info\AppData\Local\VisualGDB\EmbeddedDebugPackages\\bin\openocd.exe -c "gdb_port 62444" -c "telnet_port 62442" -f interface/stlink.cfg -f target/stm32h7x_dual_bank.cfg -c init -c "reset init" -c "echo VisualGDB_OpenOCD_Ready" When i try Embedded Project and debug using OpenOCD the TEST button gives below output. It looks like theere is a problem with resetting target MCU. It has ST-Link v3 onboard and FW is up to date. But there is a problem with uploading/debuging.
