2024-04-01 02:07 AM - last edited on 2024-04-01 07:44 AM by SofLit
Hi! I have a code that is supposed to develop CAN-bus communication, but these two functions go straight to error handler. Any suggestions why that might be?
for reference I'm using the nucle-l433rc-p board.
Solved! Go to Solution.
2024-04-03 04:52 AM - edited 2024-04-03 05:23 AM
Hello,
Reproduced the issue.
R19 (100ohm) needs to be soldered too to connect MCO output from ST-Link to the HSE OSC_IN of your MCU.
2024-04-01 02:23 AM
Change CubeMx Settings-->RCC-->HSE to 'Crystal/Ceramic Resonator'
2024-04-01 02:29 AM
Hello,
You are in HSE bypass mode.
Are you sure SB64 is soldered?
2024-04-02 08:06 AM
2024-04-02 08:20 AM - edited 2024-04-02 09:53 AM
Failing Why? Because HSE clock not present, PLL not running/locking from the selected source.
Can you observe an 8 MHz clock signal at the pin/solder bridges?
SB64 isn't bridged in your picture, but SB68 / SB70 are, with a zero ohm. There's solder paste but it's not bridging the two islands. You might need to add more and wet it across the pads.
You'd need to bridge SB64, and clear the bridging on SB68/SB70, so that the 8 MHz from the ST-LINK is passed.
You also have ALL the source code, you can inspect what's actually causing the routines to return an error. Do some debugging.
2024-04-02 08:52 AM
Need to double check again SB64. Looks like not soldered.
2024-04-03 03:53 AM
I've soldered SB64. Now the code is stuck in between two libraries. Any ideas?
2024-04-03 04:02 AM
Not sure I understood what do you mean by:
the code is stuck in between two libraries. Any ideas?
2024-04-03 04:27 AM
I used the "step into" function to see where the code breaks. I unfroze
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) and stepped inside it. And that's where the code (in between the libraries) just loops around. I can click step into countless of times, and it keeps going back and forth these two. Did i make sense here?
2024-04-03 04:41 AM
That's a wait loop with a timeout - so it will keep going around.
Try putting breakpoint(s) at the place(s) it would reach after exiting that wait loop.
Please use this button to properly post source code - rather than screenshots: