2021-07-29 03:28 PM
Hardware: STEVAL-HKI001V2
Workbench: 5.4.6
Ex project name: STEVAL-HKI001v2 project with STGAP1AS
IDE: uV5
CubeMX: 6.2.1
*note* this behavior seen with completely new/stock/vanilla/unedited Workbench, Cube, and uV projects
expected behavior: click "monitor>connect" and establish serial comms w board
actual behavior: click "monitor>connect" and comms cannot be established
firmware execution: code never reaches while(1) because infinitely repeating TIMx_BRK_M1_IRQHandler() calls begin during MX_NVIC_Init() execution. This does not occur in other workbench projects with working comms.
2021-08-03 01:17 AM
Dear @Mh.1
Could you join a scrennshot?
Best regards
2021-08-03 09:49 AM
[redacted]
I copy/pasted the body of this message into a reply to Laurent's message
2021-08-03 01:10 PM
Hi Laurent! Thank you for your prompt support. Please refer to the following images.
image 01 - Breakpoint at line 114 of main.c where MX_NVIC_Init() is called. I reset the board and example code reaches this point as expected (see yellow cursor)
image 02 - Breakpoint at line 121 of main.c where while (1) is called. I advance example code from line 114 (press F5), and the code runs forever but never reaches while (1).
image 03 - I stop code and follow function calls up to the highest level, I find an interrupt request handler TIMx_BRK_M1_IRQHandler(). I set a breakpoint inside this function and run example code over and over (press F5, F5, F5) and I see this interrupt request handler is called forever. Maybe this is why example code never reaches while (1)?
image 04 - Breakpoints at lines 184 and 186 inside MX_NVIC_Init(), I reset the board and tap F5 and see the code gets to line 184 but never reaches 186. It is stuck in IRQ, as seen previously.
image 05 - But if I start at line 184 and advance line-by-line (hold F11) the code will advance as expected! The code will advance through the entire MX_NVIC_Init() function and will even reach my while (1) loop as expected. But only if I manually step through the code one line at a time with the debugger. During normal operation without breakpoints the code does not work.
Please can you advise?
Thank you!
MH