cancel
Showing results for 
Search instead for 
Did you mean: 

how do i find the exact names for typedef structures

deep_rune
Associate III

Im trying to find how to write to the common ADC registers CCR on an STM32L412. What is the name of the structure I need to use? Im trying to access the common ADC register CCR

I am using the names for registers is stored under the file in CMSIS>Device>ST>STM32..>Include>STM32.. but this doesn't seem to include the *names* of the structures - they're labelled at the end of the structure, but you actually can't use the names as they are there - for example

ADC_TypeDef;

must be either ADC1 or ADC2. So how do I refer to

ADC_Common_TypeDef;

?? how am I meant to know?

1 ACCEPTED SOLUTION

Accepted Solutions
Nikita91
Lead II

You can use ADC12_COMMON, which is defined in stm32l412xx.h as:

#define ADC12_COMMON    ((ADC_Common_TypeDef *) ADC12_COMMON_BASE)

example; ADC12_COMMON->CCR = xxxx ;

View solution in original post

1 REPLY 1
Nikita91
Lead II

You can use ADC12_COMMON, which is defined in stm32l412xx.h as:

#define ADC12_COMMON    ((ADC_Common_TypeDef *) ADC12_COMMON_BASE)

example; ADC12_COMMON->CCR = xxxx ;