cancel
Showing results for 
Search instead for 
Did you mean: 

Add a channel to existing Injected Channels ADC in MC Workbench

AnthonyK
Associate II

Hello,

 

I was reading the RCM Regular Conversion Manager. It states that it is forbidden to add new injected channel on ADCs using current sensing. However, they do give an option to use regular conversion.

 

But in my case, I need to read a sensor at the  same time of the current sensing. Since we have two ADCs used for current sensing since I am using STEVAL-PTOOL4A, is it possible to add this channel as injected one on both ADCs ? and what is the issue in adding it to one of the ADC as injected channel? I don't get what could be the issue?

 

Thank you.

3 REPLIES 3
GMA
ST Employee

Hello @AnthonyK,

If you are not using High Sensitivity Observer, ADC3 is not used and PB1 Pin input is available.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

Aha ok, but the issue I need  this additional ADC to be triggered with the same event of the current ADCs (so it is the middle of the PWM signal). Is it ok than to have an interrupt from the ADC3? 

 

Plus if I have well understood, in the generated cubeMX  from the MC Workbench, the ADC1 and ADC2 interrupts are configured as end of single conversion. However, in the generated code (in the R3_2_Init) we disable the EOC and we enable the end of sequence conversion of one of the ADCs? 

Hello @AnthonyK,

Setting ADC3 External Trigger parameters as for ADC1 and ADC2, ADC3 Inj value will be available at the same time as the reading of the ADC1/2 current values.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA