2011-04-19 11:12 AM
STM32 DSO nano add new ADC
#dso-nano #dso-nano2011-05-17 05:32 AM
''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
2011-05-17 05:32 AM
2011-05-17 05:32 AM
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, Hal2011-05-17 05:32 AM
Do you
know what
is the
registerthat
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
?
THANKS2011-05-17 05:32 AM
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, Hal2011-05-17 05:32 AM
2011-05-17 05:32 AM
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, Hal2011-05-17 05:32 AM
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?2011-05-17 05:32 AM
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
codemore
easily
. (andmaybe
in
my work
does not
need
to use
DMA)
Thanks