cancel
Showing results for 
Search instead for 
Did you mean: 

STM3240G-EVAL Help me please!

fullcaos
Associate II
Posted on October 06, 2012 at 11:50

Hi, I just bought an evaluation board STM3240G-EVAL

I tried to modify the example provided by ST called ''ADC3_DMA'' but I could not change the pin from what I acquire the signal 

For example I wanted to go from pin PF9 to PC4 and I modified the GIPIOF in GPIOC and pin number GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9 as GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;

but it does not work ....

I attached the main file in this post

what is wrong? please help me, even sending me a main with the corrections to change the pin. :D thanks

#stm3240g-eval
13 REPLIES 13
frankmeyer9
Associate II
Posted on October 06, 2012 at 12:05

For example I wanted to go from pin PF9 to PC4 and I modified the GPIOF in GPIOC and pin number...

 

RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA2 | RCC_AHB1Periph_GPIOF, ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC3, ENABLE);

If you change the GPIO pin/port, you should not forget to enable the clock for the new port.

fullcaos
Associate II
Posted on October 06, 2012 at 12:12

Even though I always use the same port GPIOF still does not work, for example if I change only the pin to PF8 to pinPF9 still does not work! I have to change some settings in the DMA? can take a look at the main I have attached to this post? please

________________

Attachments :

main.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtTy&d=%2Fa%2F0X0000000aQc%2F7P8iElrPORqAc_1wUsYFvJ4It6tuvr1UpnJrnuwos8o&asPdf=false
frankmeyer9
Associate II
Posted on October 06, 2012 at 14:02

I suggest to try the original example, and follow the sequence of initialization.

When changing the ADC channel, you need to replace the associated GPIO initialization, and all references to the ADC channel(s).

And if this ADC channel is bound to a GPIO pin on another port, you additionally need to enable the clock to this port.

Cross-check with the reference manual. The related information is spread across several chapters, however (GPIO, ADC). The pin assignment is found in the datasheet, which is separate at ST, for what reason so ever.

I do not have the STM3240G-EVAL board, so I can't reproduce your example directly.

fullcaos
Associate II
Posted on October 07, 2012 at 11:30

thanks 🙂

you have been very kindly. tomorrow I will be able to test your advice on my board.

I'll let you know how it went! thank you again. 

Posted on October 07, 2012 at 16:09

PC4 does not use ADC3

You will need to address the ADC unit, and channel, as they relate to the specific pin you are using.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
fullcaos
Associate II
Posted on October 07, 2012 at 16:16

where can I find this information?

where I can see which pins using the ADC1, ADC2 and the ADC3?

one last question you know a site or a book with some good tutorial for STM32 microcontroller family?

thank you again! 🙂

you've been very kind!

raptorhal2
Lead
Posted on October 07, 2012 at 16:55

Take a look in the Eval board reference manual UM1461 available on ST's web site for this device. Table 3.18 plus other connector tables define pin assignments. Many of the ADC3 pins are common with other possible uses such as USB and Ethernet.

Family tutorials are sales brochure oriented. Read the reference manuals and datasheets for the devices being programmed. Application tutorials are also available on the web site.

Cheers, Hal

Posted on October 07, 2012 at 16:57

where can I find this information? where I can see which pins using the ADC1, ADC2 and the ADC3?

The data sheet for the specific chip you are using, and more generally the reference manual for the series. Pay particular attention to the pin association and routing with respect to specific peripherals, channels, etc.

http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/DM00037051.pdf

Most everything specific to the STM32 part can be found on ST's site under the various ''Design Support'' tabs. You might need to look at a couple of the parts and boards to collect everything that is useful.

Review the firmware examples.

Information generally related to the ARM parts, and the core, can be found on ARM's site. Documentation for the M3 and M4 Cortex will be useful. For a different perspective, ie not raw data sheets and documentation, you might want to get one of Joseph Yiu's books on the Cortex Mx series parts.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
dorrachendoul
Associate II
Posted on April 10, 2013 at 16:59

Hello ,

Can you please tell me how did you get STM3240G-eval examples ? Is it the same as STM32F4Discovery ?