how do i find the exact names for typedef structures
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-08 02:58 AM
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?
Solved! Go to Solution.
- Labels:
-
ADC
-
STM32Cube MCU Packages
-
STM32L4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-08 04:26 AM
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 ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-08 04:26 AM
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 ;