cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F3 Discovery next steps?

don23
Associate II
Posted on December 13, 2012 at 04:35

Hi,

I successfully setup IAR 6.5 and got the F3 Discovery Bd. demo working along with modifying the code to change the LED timing. I read through UM5170 User Manual. I'm looking for more examples to learn about the peripherals. So, I downloaded the AN4157 firmware examples. This includes brief descriptions of each peripheral but not the tutorials to work them.

I also found examples with, ''This example has been tested with STMicroelectronics STM32303C-EVAL (STM32F30x)  evaluation board and can be easily tailored to any other supported device and development board.'' However, it doesn't explain How to do this.

Since I'm new to ARM and 32F3, I would appreciate what next steps to learn this platform.

Thanks!

#stm32f3-iar #adc #discovery-board #:-discovery-board-stm32f3
53 REPLIES 53
hilwan
Associate II
Posted on September 30, 2013 at 16:03

And what do you think about 1),2) and 3)? is correct as configuration ?

''You could process the data in place if you are capturing and stopping, or you could upload the data and post-process it.''

When upload data, i'll have the limitation resources problems but what do mean by capturing and stopping   ?

Posted on September 30, 2013 at 17:22

This is your project, you'll need to make your own determinations.

Capture and Stop, ie you capture at a rate the maximum amount of data, then stop capturing, and process the data you have. Where the capture rate is higher than the rate you can process the information.

Discontinuous. Snap-Shot
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hilwan
Associate II
Posted on September 30, 2013 at 17:58

Ok, thanks you, by my question about computing values i was asking if it's the correct method or no.

Your explanations  were very helpful for me to understand a lot of thing, i'll be an expert of STM32 :) thank you again  

Posted on September 30, 2013 at 19:03

 i was asking if it's the correct method or no.

The numbers aren't making much sense to me, if I wanted to sample at 100 KHz I wouldn't pick a sample time that's slower (>180 cycles), and I'd expect the TIM to initiate conversions at 10 us not 100 us. The conversions aren't pipelined, so you'd also want some amount of margin too.

I'm saying that you need to do the long/hard thinking about this. I'm not using the F3/ADC and not looking to get pulled into intricacies of the documentation/function at this level.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hilwan
Associate II
Posted on October 18, 2013 at 16:03

Hi again clive1,

So i succeed to get my 4 ADC working together in the same time. But i still have problem. When i drive the same input for ADC1 and ADC2 working in dual mode, sometimes i don't have the same value for the slave and the master, i have noticed that looking at the CDR register in debug mode.

The same problem with ADC3 and ADC4.

Enclosed

you will find

the code i have used.

If will be very grateful for any help.

Remark: The same input is driver to the 4 ADC to test if you get the same output at the same time.

________________

Attachments :

main.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzow&d=%2Fa%2F0X0000000bQ9%2FOaHX5E1q6HBQaWryJKw1nam5DWGMWoz2CsD09RLUInI&asPdf=false
Posted on October 18, 2013 at 16:35

sometimes i don't have the same value for the slave and the master

The value is not identical, or the difference is bigger than some expected conversion error threshold?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hilwan
Associate II
Posted on October 18, 2013 at 18:05

The value is not identical, or the difference is bigger than some expected conversion error threshold? : Difference sometimes is bigger than the expected conversion

Posted on October 18, 2013 at 21:49

Ok, I'm not sure if that quantifies it for me.

A bigger issue here might be one of memory coherency, the ADC+DMA operation is continuing concurrently with the CPU. You are reading values that can be transient. You might want to be using the HT and TC interrupts and processing the half the buffer at a time in a ping-pong fashion. If you plan on dwelling on the data for a while, you might want to memcpy() it to another buffer which doesn't have DMA going on in the background. Ideally you will process the data at a rate faster than the ADC is generating it.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hilwan
Associate II
Posted on October 22, 2013 at 17:41

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=0680X000006I6nT&d=%2Fa%2F0X0000000bvf%2F1NgO21VrsV4N9X0IL_VnKql1abfqMZMBD.7MhtyIQvM&asPdf=false
Posted on October 22, 2013 at 18:12

For most purposes the two DMA operations are occurring in parallel. For coherency you want to be using the HT and TC events to process half of the buffer for both groups of samples.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..