cancel
Showing results for 
Search instead for 
Did you mean: 

I want to do ADC on 5 channels with stm32f722ze, but cannot obtain data on the latter 2 channels.

kelly1
Associate

I want to do ADC with 5 channels using STM32 Nucleo-144 development board with STM32F722ZE MCU.
I can collect data by DMA, but I can only get data from in0~in2.
Finally, I want to get ADC data from 5 channels at 1kHz using timer interrupt.
This is my first time using an MCU and I am not very familiar with it, so I need your help.
Attached is the main.c file.
(I am using a translator)

kelly1_0-1734316802814.png

kelly1_1-1734316849202.png

 

1 REPLY 1
Hl_st
ST Employee

Hello, 

here I am sending a similar example for STM32C0, you should find the right settings for your purpose here. This example code periodically (1kHz) read all analog inputs and each values writes to memory by DMA and periodically print read values from memory to usart.

ADC was configured:

- All inputs except IN2, IN3 (pins used by usart), Temperature sensor, Vrefint Channel, VDDA Channel, VSSA Channel

- 8 bit resolution

- DMA Continuous Requests Enabled

- External trigger conversion source as Timer 3 Trigger Out event

- Other configurations stay as defaults

- DMA mode circular, Peripheral to memory, Data Width as Byte

TIM3 is configured as:

- Clock Source as Internal Clock

- Counter Period to 47 999

- Trigger Event Selection TRGO as Update Event

SYSCLK was configured to 48 MHz

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.