cancel
Showing results for 
Search instead for 
Did you mean: 

STEVAL-HKI001v2 example project in ST MC Workbench, why can't I connect?

Mh.1
Associate II

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.

3 REPLIES 3
Laurent Ca...
Lead II

Dear @Mh.1​ 

Could you join a scrennshot?

Best regards

Mh.1
Associate II

[redacted]

I copy/pasted the body of this message into a reply to Laurent's message

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)

0693W00000D1QyLQAV.png 

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).

0693W00000D1QjGQAV.png 

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)?

0693W00000D1QlgQAF.png 

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.

0693W00000D1QusQAF.png 

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.

0693W00000D1QxhQAF.png 

Please can you advise? 

Thank you!

MH