2017-05-17 04:45 AM
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 #stm32f765Solved! Go to Solution.
2017-05-17 05:53 AM
Do you have SYSCFG clock enabled in RCC?
JW
2017-05-17 05:53 AM
Do you have SYSCFG clock enabled in RCC?
JW
2017-05-17 08:05 AM
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