STM32 connection problem

Sysprogs forums Forums VisualGDB STM32 connection problem

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #23634
    MystikReasons
    Participant

    After playing around with the I2C clock under the generated function: <SystemClock_Config> I cannot connect to the board anymore.

    I replaced every setting I set but it still won’t work.

    The code has been generated with the STM32CubeMX.

    C:\Users\jense\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.openocd\bin\openocd.exe -c “gdb_port 59525” -c “telnet_port 59526” -f interface/stlink-v2-1.cfg -f target/stm32l0.cfg -c init -c “reset init” -c “echo VisualGDB_OpenOCD_Ready”
    Open On-Chip Debugger 0.10.0 (2018-12-12) [https://github.com/sysprogs/openocd]
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    WARNING: interface/stlink-v2-1.cfg is deprecated, please switch to interface/stlink.cfg
    Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select <transport>’.
    adapter speed: 300 kHz
    adapter_nsrst_delay: 100
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
    none separate
    Info : clock speed 300 kHz
    Info : STLINK V2J28M17 (API v2) VID:PID 0483:374B
    Info : Target voltage: 3.239448
    Error: init mode failed (unable to connect to the target)
    in procedure ‘init’
    in procedure ‘ocd_bouncer’

     

    VisualGDB version: 5.4.100.2737
    —————— System.Exception ——————
    System.Exception: init mode failed (unable to connect to the target)
    at VisualGDB.Common_GUI.WPF.DebugMethodTestWindow.ThrowTestFailedException()
    at VisualGDB.Common_GUI.WPF.DebugMethodTestWindow.TestThreadBody()

    #23635
    MystikReasons
    Participant

    The problem was I’ve set the i2c frequency in cubemx to 400kHz in Fast Mode but I only got ~50kHz on the SCL line. So I just changed the i2c clock source from PCLK1 to HSI 16. But this destroyed my whole communication and I don’t know why.

    #23636
    MystikReasons
    Participant

    Problem solved.

    I’ve rebuild the whole solution and now it seems to work again.

    • This reply was modified 5 years, 3 months ago by MystikReasons.
    #23641
    support
    Keymaster

    Good to know it works. If you would like to find out why the I2C frequency setting affects debugging, please consider creating a thread on the ST forum – someone from the ST community might have an insight into this.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.