cancel
Showing results for 
Search instead for 
Did you mean: 

Example for simple ADC conversion

ccowdery91
Associate II
Posted on January 27, 2016 at 11:50

Hello,

I am trying to get a simple example going for the ADC of an STM32F407V discovery board.

I tried the VBAT sampling example, but so far without luck. I only get ''0,0'' via serial port on the output.

My environment is based on CooCox, and I configure the clocks (f_sys) to run on 48 MHz with HSE 8 MHz. I use DMA to transfer data from the ADC to the main display function.

How can I start/debug the setup and experiment with the different ADC modes?

Thanks!

#adc
5 REPLIES 5
pkumar1883
Associate II
Posted on January 27, 2016 at 14:01

Dear Poseid,

Debugging in Coocox is similar to other IDEs like Keil, IAR etc. Just set Configurations for your debugger. In coocox goto view>configuration>debugger, select your Adaptor and Port .  Just see raw value of ADC.

ccowdery91
Associate II
Posted on January 27, 2016 at 14:47

Thanks, where do I find the memory address location for the raw ADC values?

pkumar1883
Associate II
Posted on January 28, 2016 at 08:17

As you wrote ''I use DMA to transfer data from the ADC to the main display function.''

 

 

So I hope your main display function is processing some raw data, before sending it to serial port. So in this function you can debug the raw data(received from DMA/ADC)

 

ccowdery91
Associate II
Posted on January 28, 2016 at 17:28

Thanks!

I've found some nice examples that worked on my Discovery board via this blog:

http://myactivities-mazen.blogspot.de/2013/04/adc-with-stm32f4.html

javidan
Associate
Posted on January 29, 2016 at 10:16

From: poseid

Posted: Thursday, January 28, 2016 5:28 PM

Subject: Example for simple ADC conversion

Thanks!

I've found some nice examples that worked on my Discovery board via this blog:

http://myactivities-mazen.blogspot.de/2013/04/adc-with-stm32f4.html