cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 DSO nano add new ADC

firmanandres
Associate II
Posted on April 19, 2011 at 20:12

STM32 DSO nano add new ADC

#dso-nano #dso-nano
10 REPLIES 10
Posted on May 17, 2011 at 14:32

''I can´t add a new ADC channel in the DSO nano firmware''

 

 

Why not - what's stopping you?

What have you tried?

Where are you stuck?

Did you study all the material available here: 

http://code.google.com/p/dsonano/

and the manuals, forum, etc  here: 

http://www.seeedstudio.com/depot/micro-digital-storage-oscilloscopedso-nano-p-512.html

firmanandres
Associate II
Posted on May 17, 2011 at 14:32

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6a5&d=%2Fa%2F0X0000000br9%2FVMle2uzyAcQcur9qxWQep9gjfvxMJ0oe2G9C90_8sJk&asPdf=false
raptorhal2
Lead
Posted on May 17, 2011 at 14:32

You cannot find something like

ADC_RegularChannelConfig (ADC1, ADC_Channel_15, 1, ADC_SampleTime_1Cycles5)

because DSO nano did not use the standard peripheral library, they coded the registers directly. So two choices you have are writing your own equivalent code using the library, or studying the reference manual for your device and figure out which ADC registers need to be coded differently in the nano code to achieve your result.

Library code will run a bit slower and use more memory. That may or may not be significant in your application. But library code is much easier to understand and maintain.

Cheers, Hal

firmanandres
Associate II
Posted on May 17, 2011 at 14:32

Do you

know what

is the

register

that

associates the

DMA

with

an

analog channel in the example

?

I can not

find it in

the

reference manual.

and

do you

know

where

I can

find

the

libraries

for

the

analog

configuration

?

THANKS
raptorhal2
Lead
Posted on May 17, 2011 at 14:32

You first set up a sample sequence, for example channels 1, 5, 2, 7. The values are then stored in that sequence in the DMA buffer. That is the association.

The libraries should be included with your IDE, and there should be examples of how to use it for the ADC.

How did you set up the clocks, NVIC, GPIOs, etc. before programming the ADC without realizing you were using the library ? Or, are you not even at that stage yet ?

Cheers, Hal

firmanandres
Associate II
Posted on May 17, 2011 at 14:32

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6aA&d=%2Fa%2F0X0000000brA%2Fq4ceIFjbPReVhhFHrd98I_ByjnDoM8WavTkVAvXYqPA&asPdf=false
raptorhal2
Lead
Posted on May 17, 2011 at 14:32

I have deliberately avoided becoming skilled at bit coding peripheral registers.

If you are getting lost trying to determine how to bit code registers, why not recode the ADC and DMA configuration functions to use the library ? Then your code will be maintainable.

Cheers, Hal

Posted on May 17, 2011 at 14:32

For specific questions about the DSO Nano or its firmware, you should really be asking on the DSO Nano forum!

Again, have you studied the DS Nano documentation?
firmanandres
Associate II
Posted on May 17, 2011 at 14:32

Hi

;

I

have read

the documentation on

DSO

nano

and

posted

on

their

forum

but

no one

answers

.

I've also

tried

adding

the

include files

,

but I can not

compile.

Do you have

any

EWARM

ADC

example

for

me

?

so I can

use

the same

libraries

and

write

code

more

easily

. (and

maybe

in

my work

does not

need

to use

DMA)

Thanks