cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_RCC_OscConfig detects null pointer with a valid pointer?

DavidAlfa
Senior II

Called from SystemClock_Config.

The pointer is clearly ok, as you can see in the Vars window, but the check detects it as null and exits with HAL_ERROR.

Doesn't make any sense, any thoughts?

0693W00000GZtu3QAD.png

1 REPLY 1

Which STM32?

> the check detects it as null and exits with HAL_ERROR

Are you sure it's this check which returns with HAL_ERROR? Single-step in disasm window and observe what's happening in the registers.

Alternatively, switch optimization (maybe only for this particular function) off.

JW