no write access to ADC12_CCR registers of STM32G473QE
Hello,
my problem is that i can't get access to the ADC12_CCR register. I activated the corresponding Clock in the RCC_AHB2ENR register. In addition I compare the addresses of the register from the library with the data of the reference manual, they are the same. I tried the same with the ADC345_CCR register, that access succeeded.
My minimal code is very simple without HAL or LL Library, so it's very clearly to understand.
PS: I also tried it with the HAL library, but the HAL Library also don't get access to this register.
#include "stm32g473xx.h"
void main(void)
{
RCC->AHB2ENR|=RCC_AHB2ENR_ADC12EN;
ADC12_COMMON->CCR=0x1C0000;
}
This CODE above don't work.
But the following code below is working...
#include "stm32g473xx.h"
void main(void)
{
RCC->AHB2ENR|=RCC_AHB2ENR_ADC345EN;
ADC345_COMMON->CCR=0x1C0000;
}
I don't no, it's a mysterium. I don't found a reason for a defect in the errata sheet.
Do i have miss some important information from the reference manual? Maybe is the address of the ADC12_CCR register (0x50000208) wrong?
Is there some clock I have to activate in addition?
On further try was with direct addressing of the register
#include "stm32g473xx.h"
void main(void)
{
RCC->AHB2ENR|=RCC_AHB2ENR_ADC12EN;
*((uint32_t*)0x50000208)=0x1C0000;
}
