cancel
Showing results for 
Search instead for 
Did you mean: 

What are the steps to implement ADC in Dual mode for STM32L475?

Harish1
Associate III

There is no detailed procedure given in ref. manual to implement the dual-mode of ADC.

I have below doubts:

  1. Can I initialize the ADC1 and ADC2 individually and then configure the dual-mode related registers?
  2. Do I need to simultaneously all the configurations for ADC1 and ADC2 to configure the dual-mode ADC?

Implementing in two ways make sense. In one of our projects, 1st-way implementing causes issue and then implemented in a 2nd way then issue resolved. That's why I am asking this question.

Is there any example program for dual-mode ADC for STM32L475?? I tried but had no success.

3 REPLIES 3
TDK
Guru

You can only write one register at a time, so there's no way to do them simultaneously.

You need to ensure the slave is ready to go when you start the master.

Here is an example:

https://github.com/STMicroelectronics/STM32CubeL4/blob/5e1553e07706491bd11f4edd304e093b6e4b83a4/Projects/NUCLEO-L412RB-P/Examples/ADC/ADC_DualModeInterleaved/Src/main.c

If you feel a post has answered your question, please click "Accept as Solution".
Harish1
Associate III

 I found that one mistake is done. I have enabled both the ADCs and then dual-mode selection done but it violates the process recommended by ST as below screenshot. What could be the consequence of it?

0693W00000D03UpQAJ.png

The consequence of doing something not allowed per the RM is unspecified behavior. Maybe it’ll work, maybe not. Maybe it’ll work only sometimes.
If you feel a post has answered your question, please click "Accept as Solution".