Skip to main content
Martin1
Associate II
August 14, 2018
Solved

How do I use ADC4 in MCSDK 5.X

  • August 14, 2018
  • 3 replies
  • 1076 views

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

This topic has been closed for replies.
Best answer by Claire O.

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

3 replies

Claire O.
Claire O.Answer
Technical Moderator
August 17, 2018

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

Martin1
Martin1Author
Associate II
August 22, 2018

Nice! I thought I had to use those routines to not interfere with the rest of the software. Many thanks :)

Laurent Ca...
Senior III
June 28, 2021

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