How do I use ADC4 in MCSDK 5.X
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-14 7:57 AM
Hello!
I would like to use the ADC4 of a nucleo303RE board with a X-NUCLEO-IHM08M1.
The Software (MCSDK 5.1.3) has functions already written for this in mc_tasks.c:
void MC_RequestRegularConv(uint8_t bChannel, uint8_t bSamplTime)
uint16_t MC_GetRegularConv(void)
UDRC_State_t MC_RegularConvState(void)
The Problem with this: I can only choose the Channel but not the ADC instance to be converted so the conversion is seemingly always made on ADC1. How can I change the ADCx (x=2,3,4) to be used for my conversion?
Many Thanks,
Martin
Solved! Go to Solution.
- Labels:
-
ADC
-
STM32 Motor Control
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-17 12:55 AM
Dear Martin,
The purpose of these routines is to allow external access to resources that are already used by MC library in order to avoid concurrent accesses. (in that case ADC1 is used for temperature and bus voltage sensing). If you need a resource which is not used by MC library, please feel free to do so in your own application.
Best regards,
Claire
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-17 12:55 AM
Dear Martin,
The purpose of these routines is to allow external access to resources that are already used by MC library in order to avoid concurrent accesses. (in that case ADC1 is used for temperature and bus voltage sensing). If you need a resource which is not used by MC library, please feel free to do so in your own application.
Best regards,
Claire
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-08-22 12:02 AM
Nice! I thought I had to use those routines to not interfere with the rest of the software. Many thanks :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-27 10:32 PM
The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards
