Hi once again. I am needing help now to get ADC working on the STM32F407 discovery board.
I have looked at Terry Porters's article on ADC for the STM32F0 and tried to use it as a model for the F407.
However, there are a lot of differences in register use and setup and certain steps seem to be in another order.
The RM0090 manual is full of information about what everything does, but little about what to do with it! A paragraph on the steps to initialise the ADC would have been a help.
After spending a few days in getting very confused, I am asking for help with the attached code I have managed to create so far.
Many thanks,
Richard
Hi Terry
Thanks. I should have thought of looking there before. I have loaded it and it runs OK. I will now see what is the same in it with some code I spent a couple of hours on today. Time not wasted - I learnt a lot from going back and forth in the RM0090 manual!
Your help much appreciated as before.
Cheers
Richard
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi once again. I am needing help now to get ADC working on the STM32F407 discovery board.
I have looked at Terry Porters's article on ADC for the STM32F0 and tried to use it as a model for the F407.
However, there are a lot of differences in register use and setup and certain steps seem to be in another order.
The RM0090 manual is full of information about what everything does, but little about what to do with it! A paragraph on the steps to initialise the ADC would have been a help.
After spending a few days in getting very confused, I am asking for help with the attached code I have managed to create so far.
Many thanks,
Richard
Richard,
What type of ADC set up are you after ?
i.e. polled, interrupt, dma, single channel, multi channel ?
Hi Terry
I was trying to set up something like the example you had for the F0 board - polled, no DMA and a number of channels (3 probably).
Hi Richard,
There is sample code for the 407 in the Mecrisp-Stellaris release tarball. This directory is a good place for sample code.
mecrisp-stellaris-2.5.8/stm32f407/adc.txt
Hi Terry
Thanks. I should have thought of looking there before. I have loaded it and it runs OK. I will now see what is the same in it with some code I spent a couple of hours on today. Time not wasted - I learnt a lot from going back and forth in the RM0090 manual!
Your help much appreciated as before.
Cheers
Richard
No worries, I have never used the F407 ADC which it totally different to the one in my F051, no wonder you couldn't find any common ground there.
I find that the Mecrisp_Stellaris release is a great source of examples and code, probably the best source. Just polish up on your GREP !
Cheers,
Terry