Need help with the STM32F4-Discovery board...

Inducktion, Sat Oct 15 2011, 12:31AM

I recently acquired this dev board from ST, and I haven't the foggiest idea where to begin with it...

I do have two goals though, and, I perfectly realize it's overkill for the job I have in mind, but I would like to make a Li-ion/NiCd battery charger with it...

I know you need C++ to program it, but other than that, this thing might as well be from Mars as far as I'm concerned.
Re: Need help with the STM32F4-Discovery board...
RickR, Sat Oct 15 2011, 03:37AM

Here's an IDE for the STM32F4: Atollic Website

I haven't used it at all for the F4, but I did compile a test program for the STM32F103RE evaluation board. They claim the free download version for the F4 version only supports C, but it seems to keep making reference in the IDE to C++.

CodeSourcery has command line-driven tools that I believe will work for the F4: CodeSourcery Site

I'm just getting started with the F4 also.

You might find this STMicroelectronics link useful also: STMicro Site Click on Design Support.

Just a bit more:Reference (choose Resources) The >1300 page reference manual can be found here.

This ought to help you get started.

Rick
Re: Need help with the STM32F4-Discovery board...
Pinky's Brain, Sat Oct 15 2011, 03:55PM

IMO C++ is not the language to program uCs, unless you just use the C++ compiler to have // comments ... that's fine.

A macro assembler is fine too.
Re: Need help with the STM32F4-Discovery board...
Linas, Sat Nov 12 2011, 05:18PM

does any one tried to connect lcd to f4 board ?
i have working code for stm32f103 mcu, but still no luck adapting code for st32f407mcu.
only part witch is left is GPIO initialize function, if some one can help me with that i even could pay neutral
(since i spend more than 20h just by doing that, and i am getting headache from all of this unsuccessful programing)
1321118307 1143 FT126188 P1010863
Re: Need help with the STM32F4-Discovery board...
Patrick, Thu Feb 09 2012, 02:55AM

Hey! i just noticed this thread, i too am using a Discovery board from ST, the STM32L!

im using the "L" sereis but id like to do optical flow on one of the "F" chips from the MS kinnect. im still trying to figure out how to use a "SLAM" model for robot real time mapping.

how many of us are there here on the forum?


if i buy the chips alone and try to attch them to my own mainboard, does anyone know what code is needed for debug and usb connectivity? I know the need some low level code first to start working. There are two chips, the target and then the USB handler IC...

Re: Need help with the STM32F4-Discovery board...
Carbon_Rod, Thu Feb 09 2012, 04:40AM

CodeSourcery is pretty much a waste of time, and a sleazy ploy to get around the GPL.
Think about the most unoptimized version of the gcc you can imagine.

The gcc is a great compiler, but almost all the board support packages and documentation will be for the over priced Codewarrior IDE/compiler, or horrid Raisonance/Cosmic compilers.

You will need a JTAG programmer if the board did not come with a USB/Serial bootloader programmed on chip. If you can get Uboot working it gets a little easier...

So you think everything is ready to go? Nope, the uC/OS RTOS for the M3 series they often bundle is unstable garbage. This company does not give a bean about other peoples time... smile

Re: Need help with the STM32F4-Discovery board...
Patrick, Fri Feb 10 2012, 06:32PM

im trying to get a PID loop running in C on my STM32L... im finding a lot of examples, but i have no idea how good (or poor) they are.
Re: Need help with the STM32F4-Discovery board...
Carbon_Rod, Sat Feb 11 2012, 08:20AM

In general your Kalman filter is a good solution:
Link2

Fuzzy logic performance is also fine for low CPU power systems:
Link2

However, it is always advisable to have set limits that override your control loop.
i.e. If the system behaves abnormally than default to a state known to be safe to people, and then the craft.
Re: Need help with the STM32F4-Discovery board...
Steve Conner, Sat Feb 11 2012, 02:43PM

Don't Keil or IAR have a free compiler that targets the STM32? I think the code size is limited, but it turns out enough for most hobby projects.
Re: Need help with the STM32F4-Discovery board...
Carbon_Rod, Sat Feb 11 2012, 11:12PM

If your STM32F4DISCOVERY has the same model STM32F407VGT6 chip:
Link2

Information about the Ubuntu/linux based boot loader (or bypass using factory rom):
Link2
Full gcc cross compiler on MacOSX and Ubuntu/Linux:
Link2

Perhaps a small virtual machine for STM32 development with an update and build script would be helpful to a few people. As I find it helps to keep your cross-compiler development environments isolated and version locked to prevent random build environment problems.

cheers,

Re: Need help with the STM32F4-Discovery board...
Patrick, Sat Feb 11 2012, 11:47PM

Steve Conner wrote ...

Don't Keil or IAR have a free compiler that targets the STM32? I think the code size is limited, but it turns out enough for most hobby projects.

IAR is what we use at my university.
Re: Need help with the STM32F4-Discovery board...
Linas, Sat Mar 31 2012, 08:42PM

after some time and headache here is some results.
It's just amazing what IAR can do, atollic is just waste of time, same code compiled with IAR runs lot faster than compiled with atollic.
Get 50MHz IO toggle so far, and with atollic can get around 3MHz (PLL and clock settings are the same)
1333226564 1143 FT126188 P1030650
Re: Need help with the STM32F4-Discovery board...
Patrick, Sat Mar 31 2012, 10:10PM

Linas wrote ...

after some time and headache here is some results.
It's just amazing what IAR can do, atollic is just waste of time, same code compiled with IAR runs lot faster than compiled with atollic.
Get 50MHz IO toggle so far, and with atollic can get around 3MHz (PLL and clock settings are the same)
1333226564 1143 FT126188 P1030650

thats great work Linas, im still trying to get SPI and I2C to work on my F4 and F0.
Re: Need help with the STM32F4-Discovery board...
Linas, Sun Apr 01 2012, 08:34PM


Real time Julia Set fractal calculation with zoom, and other C values as well ,
It looks quite nice :)
Re: Need help with the STM32F4-Discovery board...
Inducktion, Mon May 14 2012, 03:57AM

Hey, Linas, would you be willing to... teach me how to use this thing? I haven't any experience with micro controllers so... yeah.
Re: Need help with the STM32F4-Discovery board...
Linas, Sat Jun 09 2012, 04:41PM

fixed code for SSD1963 and SSD1289 and make touchcreen works (calibration is made by hands)
have working code fro spi flach below lcd, and sdcard with sdio interface
IF SOME KNOW HOW TO USE FATFS PLEASE RESPOIND


Re: Need help with the STM32F4-Discovery board...
Steve Conner, Sat Jun 09 2012, 06:00PM

Good luck with the FAT file system, it's a pain in the :-x, especially if you want long file name support.

You can make life easier by only implementing a subset of the functionality. 8.3 filenames and no subdirectories would be a good starting point.

FTDI make a device called the Vinculum. Among its many uses, it converts USB thumb drives to SPI or RS232, and has a FAT file system driver embedded in it.
Re: Need help with the STM32F4-Discovery board...
Linas, Sat Jun 09 2012, 06:32PM

Steve Conner wrote ...

Good luck with the FAT file system, it's a pain in the :-x, especially if you want long file name support.

You can make life easier by only implementing a subset of the functionality. 8.3 filenames and no subdirectories would be a good starting point.

FTDI make a device called the Vinculum. Among its many uses, it converts USB thumb drives to SPI or RS232, and has a FAT file system driver embedded in it.

here is my problem
Re: Need help with the STM32F4-Discovery board...
Steve Conner, Sat Jun 09 2012, 09:04PM

You mean somebody else implemented the filesystem driver for you and you still can't get it to work? ;-(
Re: Need help with the STM32F4-Discovery board...
Linas, Sun Jun 10 2012, 05:44AM

i used this driver, it should work, but i have no idea why it doesn't work for me
FATFS
Re: Need help with the STM32F4-Discovery board...
Linas, Fri Jul 27 2012, 12:45PM

Still playing with microcontrollers
yesterday made some neat demo:
Fractal is calculated in Matlab program, and iteration number is send to STM32F4 via bluetooth.
in stm32f4 is dead simple filtration for matching pixel iteration data to pixel position.
and it works every time with no missing data with 130k transfers over Bluetooth :)



Also get FPGA board from ebay, so first thing to do ( but not wise ) is to setup NIOS 2
on Altera cyclone 3 , and make JuliaSet painting program, so i can compare to STM32F4 for speed.
I added to NIOS2 FPU core and made size optimization in eclipse compiler so i could get fast rendering speed of complex (in mathematical way) JuliaSet algorithm.



Next step hardware unit for Juliaset, it should blow away any Cortex processor in JuliaSet rendering, can't wait to get 60FPS :D