cancel
Showing results for 
Search instead for 
Did you mean: 

How to activate Compensation Cell on STM32F765?

Gahlen Feld
Associate II
Posted on May 17, 2017 at 13:45

Hallo, on my NUCLEO board with a STM32F765ZI MCU I want to activate the compensation cell.

I can do this via

* HAL_EnableCompensationCell();

* LL_SYSCFG_EnableCompensationCell();

* oder manually via

** SYSCFG->CMPCR |= SYSCFG_CMPCR_CMP_PD;

** SYSCFG->CMPCR = SYSCFG_CMPCR_CMP_PD;

All methods will only set bit&sharp0 in SYSCFG->CMPCR.

After setting Bit&sharp0 I should be able to see this bit as set, and - after a while - I should also see bit&sharp8 as set, which signals that the compensation cell is ready... but...

when I read SYSCFG->CMPCR I ALWAYS get 0.

I am waiting for bit&sharp8 to be 1 in a while loop, so this while loop is infinite.

I checked the assembly code and it is right! Bit&sharp0 is set but the MCU will not show that even this bit is set (and therefore bit&sharp8 is also 0)...

What is the right procedure to activate the compensation cell?

Is there a hardware error in the STM32F765ZI MCU?

Thank you in advance!

#compensation-cell #stm32f765
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on May 17, 2017 at 14:53

Do you have SYSCFG clock enabled in RCC?

JW

View solution in original post

2 REPLIES 2
Posted on May 17, 2017 at 14:53

Do you have SYSCFG clock enabled in RCC?

JW

Posted on May 17, 2017 at 15:05

aaaaaaahhhhhhhhhh...

YOU ARE RIGHT!!!

I AM AN IDIOT!!!

now it works... i have switched on so many clocks but NOT the clock for the APB2 SYSCFG

THANK YOU VERY MUCH