Skip to main content
DavidAlfa
Senior II
December 3, 2021
Question

HAL_RCC_OscConfig detects null pointer with a valid pointer?

  • December 3, 2021
  • 1 reply
  • 1030 views

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

This topic has been closed for replies.

1 reply

waclawek.jan
Super User
December 4, 2021

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