2021-11-23 12:48 PM
The question in the link above is exactly similar to mine, but instead I am using a ST-LinkV3 debugger instead of their V2. I figured I would ask this question again since no one has answer in a long time.
I am using WISE-Studio and when I try and run an example project this is the console output with it being unsuccessful:
Open On-Chip Debugger 0.11.0+dev-00062-g6405d35f3-dirty (2021-03-26-11:44)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "dapdirect_swd". To override use 'transport select <transport>'.
Info : STLINK V3J8M3B5S1 (API v3) VID:PID 0483:374F
Info : Target voltage: 3.287759
Info : Unable to match requested speed 1200 kHz, using 1000 kHz
Info : Unable to match requested speed 1200 kHz, using 1000 kHz
Info : clock speed 1000 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x0bb11477
Info : bluenrg-2.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : starting gdb server for bluenrg-2.cpu on 3333
Info : Listening on port 3333 for gdb connections
Error: Fail reading CTRL/STAT register. Force reconnect
Info : stlink_dap_op_connect(reconnect)
Info : SWD DPIDR 0x0bb11477
Info : AP write error, reset will not halt
Error: timed out while waiting for target halted
** Unable to reset target **
shutdown command invoked
Warn : Flash driver of bluenrg-2.flash does not support free_driver_priv()
But, if I try and run the same program from the blueNRG-2 Navigator, I have no issue going through the direct usb connection. If someone could help out with this that would be amazing.
Thanks!
2021-12-01 02:21 AM
Hello,
I guess the problem is related to the fact debugging interface is disabled when BluenRG-2 (or BlueNRG-M2 module) is using an FW with sleep mode enabled.
Please have a look at DT0120 design tip available on st.com.
When using Navigator tool, you will not face problem as this tool will handle DIO7 (bootloader pin) of BlueNRG-2/BlueNRG-M2 from STM32L1 present on eval kit.
It will force BlueNRG-2 DIO7 to "1" before doing a reset so that BlueNRG-2 will remain in bootloader.
When trying to flash from any IDEs, you must force DIO7 to "1" before doing a HW reset or a power on / power off.
If willing to debug any application with SWD interface, and as said in in DT0120, , you should have disable sleep mode in your application or add a delay before entering sleep mode.
Regards
Laurent