First steps with STM32F429 discovery

AlexanderL
Thu May 07, 2015 10:22 am
Hi there,

first of all, cool project and fancy new forum :)
I’ve been trying to get a simple blink example to work on my STM32F429 discovery board (the one with the display). I followed the installation instructions and use Arduino 1.6.3. Here is my code:

void setup() {
pinMode(PG13,OUTPUT);
pinMode(PG14,OUTPUT);
}

void loop() {
digitalWrite(PG13,HIGH);
digitalWrite(PG14,LOW);

delay(250);

digitalWrite(PG13,LOW);
digitalWrite(PG14,HIGH);

delay(250);
}


RogerClark
Fri May 08, 2015 10:34 am
uploading using ST’s stlink uploader should be fine

I suspect perhaps there is something fundamentally different between the F407 which does work (I and one other person has one) and the 429

Can you post your test code


sheepdoll
Wed May 27, 2015 5:50 pm
Any progress on this? I have two of these boards and am looking at what needs to be modified in board.txt and platform.txt to see if I can talk to it.

RogerClark
Wed May 27, 2015 9:06 pm
The change was in tools/win/stlink_upload.bat

I’m afraid that its not going to work on OSX or Linux

The version of the stlink firmware on the F429 board does not seem to be compatible with the open source stlink uploader (texans stlink). There does not seem to be any alternative solution for mac or Linux users :-( :-(

Well, if you can find any info on how to upload from mac or Linux to the discovery F429 board please let me know and I will update the repo.

Personally, I’m probably going to reflash by F407 stlink chip with Black Magic Probe.
There is a link to an blog page on how to do this, but I don’t have it to hand at the moment, you could take a look in the Black Magic Probe thread and see if Rick linked to it, or possibly just google it ;-)


martinayotte
Thu May 28, 2015 11:12 pm
I don’t know if this help, but I downloaded this one several months ago because this tool allows also to read Flash to do backup, which I did to backup my STM32F429_Discovery. (I didn’t try burning flash yet, it still has it original demo firmware).

https://code.google.com/p/stm32flash/


RogerClark
Thu May 28, 2015 11:17 pm
Martin

(LOL)

We already use it on the F1, its in the tools folder. All OS’s use the binaries from it, and I thought I’d put the source in the repo, as Google are closing down google code.

Yes. its in /tools/src/stm32flash_serial

I will take a look at adding it as an option to the F4


martinayotte
Fri May 29, 2015 3:05 pm
Hi Roger,
Oupps ! they are so many things around (especially on my PCs), at least it gave me opportunities to update some (my old one was stm32flash-0.3beta2, now it is 0.4 :) )

Back to the other subject, I’ve un-dusted my STM32F429, and I used the Texane ST-Flash to do again a new backup of the Demo firmware.
It worked ! I diffed both backups and they are identical.
So, maybe the ST-Link firmware on my board is compliant, I will try to flash something new later …

>st-flash read newbackup.bin 0x8000000
2015-05-29T10:42:35 INFO src/stlink-common.c: Loading device parameters....
2015-05-29T10:42:35 INFO src/stlink-common.c: Device connected is: F42x and F43x device, id 0x10036419
2015-05-29T10:42:35 INFO src/stlink-common.c: SRAM size: 0x40000 bytes (256 KiB), Flash: 0x200000 bytes (2048 KiB) in pages of 16384 bytes
>diff newbackup.bin STM32F429I-Demo-ORIG.bin


RogerClark
Fri May 29, 2015 10:10 pm
Martin

On the PC I changed the stlink_upload.bat to use STMs Stlink exe, as Texane doesn’t seem to work with around 50% of the boards with on-board stlink e..g STM discover and STM Nucleo

I’m afraid anyone on OSX or Linux that has problems with Texane has no option but to reflash their stlink chip , but I know that’s a big step as there is no way back as the stlink binaries are not officially available of re flashing

STM should really provide the binaries, but I know they don’t do this for IP and commercial reasons. But as I’ve posted before, I think its a flawed decision


Rick Kimball
Fri May 29, 2015 10:12 pm
Have you tried openocd instead of st-flash? I know that works with everything I have. ST-Link V1, V2 and V2.1. It already has entries in scripts/boards for these:

$ ls st*
steval_pcc010.cfg stm3210e_eval.cfg stm32429i_eval_stlink.cfg stm32f429discovery.cfg st_nucleo_f103rb.cfg
stm320518_eval.cfg stm3220g_eval.cfg stm32439i_eval.cfg stm32f4discovery.cfg st_nucleo_f3.cfg
stm320518_eval_stlink.cfg stm3220g_eval_stlink.cfg stm32439i_eval_stlink.cfg stm32l0discovery.cfg st_nucleo_f4.cfg
stm32100b_eval.cfg stm3241g_eval.cfg stm32f0discovery.cfg stm32ldiscovery.cfg st_nucleo_l1.cfg
stm3210b_eval.cfg stm3241g_eval_stlink.cfg stm32f334discovery.cfg stm32vldiscovery.cfg str910-eval.cfg
stm3210c_eval.cfg stm32429i_eval.cfg stm32f3discovery.cfg st_nucleo_f0.cfg


RogerClark
Fri May 29, 2015 10:15 pm
Not tried it

Can you post some links

Are there any windows binaries ?


Rick Kimball
Fri May 29, 2015 10:17 pm
Yeah, I think I mentioned it in some other post. The Arduino Zero is using openocd to upload and flash things. So it is part of the Arduino eco system somplace.

http://www.stm32duino.com/viewtopic.php … nocd#p1560

-rick


Rick Kimball
Fri May 29, 2015 10:31 pm
I saw the openocd stuff here:

https://github.com/arduino-org/Arduino/ … linux/dist

And the openocd script here:

https://github.com/arduino-org/Arduino/ … o_zero.cfg

and platform integration here:

https://github.com/arduino-org/Arduino/ … atform.txt


RogerClark
Fri May 29, 2015 10:57 pm
ta

yoavshtainer
Mon Aug 24, 2015 1:36 pm
hello all!

i’m new in here, and i dont understand how to get start use stm32f429 whis the arduino 1.6.5.
i read almost everything here and try and nothing work for me.

mybe someone can guide me from the begining what i do worng? (i already work on the 429 whis IAR and do some projects but i want to use arduino files…)

the error i get now is:

STM32 ST-LINK CLI v2.1.0
STM32 ST-LINK Command Line Interface

No ST-LINK detected!


sheepdoll
Mon Aug 24, 2015 5:31 pm
yoavshtainer wrote:hello all!

i’m new in here, and i dont understand how to get start use stm32f429 whis the arduino 1.6.5.
i read almost everything here and try and nothing work for me.

mybe someone can guide me from the begining what i do worng? (i already work on the 429 whis IAR and do some projects but i want to use arduino files…)

the error i get now is:

STM32 ST-LINK CLI v2.1.0
STM32 ST-LINK Command Line Interface

No ST-LINK detected!


RogerClark
Mon Aug 24, 2015 9:23 pm
@sheepdoll

It sounds like the OP is using Windows, as thats the only platform that I use STM’s own CLI

My advice, which I’m sure has been posted before, is … if you are using Windows, to download STM’s own STLink program, and confirm you board is working at all, and you have plugged it in correctly.


yoavshtainer
Tue Aug 25, 2015 7:09 am
first of all, thank you for your help!

second, I’m using windows and the path work graet with my IAR system, i’m using the TFT and spi protocol whis no problem.

if i understand what you said, i have a lot of work until i can use the TFT screen in arduino?
if this is right, the libraries of arduino will not help me… :shock: :shock:

i can wait until Wenesday to know what i need to change in the path…

@RogerClark, i have alreay download all the ST progrems that i need, and if i can download from the IAR it’s should work for the arduino, no?


RogerClark
Tue Aug 25, 2015 7:19 am
If the STM STLink Utility works with your board, then you should be able to upload inside Arduino STM32 as it uses the same files.

Well it uses STM’s command line version of the utility

Re: LCD screen, this is quite dependant on which screen you have as most Arduino libraries don’t work without some porting to STM32

Also most libraries have only been tested on the F103 as lots of people have F103’s

So take a look in the STM32F103/libraries folder and see if someone has already ported to F103 and if so, copy that lib into the STM32F4/libraries folder and see if it works for F4.

The F4 port is not as full featured as the F103 port – I’ve posted about this serveral times before, so please read the other posts in the F4 section to get a bit of background why these 2 ports are different.

You may also want to look at the new experimental F4 cores that @sheepdoll has in her repo, as she is also mainly working on F4 and I suspect sooner of later we will all be using a version of her new core as its based on the STM HAL code.


yoavshtainer
Tue Aug 25, 2015 7:40 am
thank you!

sheepdoll
Fri Aug 28, 2015 8:33 pm
I did get a chance to install the HALMX_Arduino_STM32 branch (well it is really a separate repository) onto a XP laptop running Ardino.cc 1.6.5 On my hardware, I am not getting a path to The ST-LinkCLI. I was able to run the standalone ST-Link application and flash the F429I-Discovery from that tool. My guess is that the changes need to be done to platforms.txt, which for me is not a high priority. If others want to look into this they are more than welcome to.

RogerClark
Fri Aug 28, 2015 9:35 pm
Thats strange, I wonder if the IDE has moved the goal posts again.
Incidentally someone posted an issue about compiler paths to me on GitHub, yesterday.

So perhaps something has changed in the IDE and the way it handles the paths.


stevech
Mon Aug 31, 2015 9:36 pm
For windows and arduino libraries and ARM ST or Freescale,
via GCC….
free Visual Micro which is a plugin for the now-free MS VIsual Studio 2013 Community (excellent).
http://www.visualmicro.com/

and almost free
http://visualgdb.com/
which supports SWD debugging.
Excellent.


RogerClark
Mon Aug 31, 2015 9:40 pm
Both of these are commercial products are are not free, or AFIK Open Source.

mrburnette
Mon Aug 31, 2015 11:13 pm
RogerClark wrote:Thats strange, I wonder if the IDE has moved the goal posts again.
Incidentally someone posted an issue about compiler paths to me on GitHub, yesterday.

So perhaps something has changed in the IDE and the way it handles the paths.


RogerClark
Tue Sep 01, 2015 7:15 am
It looks like the IDE team have broken things again.

Other people are reporting similar issues

https://github.com/arduino/Arduino/issues/3751

When I attempt to compile I get “fatal error: SPI.h: No such file or directory”.


martinayotte
Tue Sep 08, 2015 12:12 am
I’ve un-dusted again my F429-Disco, and try to simple Blinker sketch, like the one from AlexanderL in the beginning of this thread.
Unfortunately, both LEDs are not blinking. I started looking if GPIO clock of AlternateFunctions were not initialized properly, and I didn’t found any thing yet.
Trying some other GPIOs, it seems to work well from GPIOA to GPIOE, but not GPIOF or GPIOG.

Anyone who have F429 got some success ?

Of course, there is plenty of GPIOs, so I’m not worrying yet.
I still have to look about all other peripherals first, but those LEDs will be convenient.


RogerClark
Tue Sep 08, 2015 12:15 am
I’ve only got a F407 and last time I tried it was working OK.

martinayotte
Tue Sep 08, 2015 12:35 am
RogerClark wrote:I’ve only got a F407 and last time I tried it was working OK.

RogerClark
Tue Sep 08, 2015 1:39 am
Martin

I only tested the ports which had the on board LEDS connected to them. From what I recall they are not the upper ports e.g. F or G

I’d be surprised if there was some different setup params for these ports, but it could be simply that their clocks etc are not being initialised at all


martinayotte
Tue Sep 08, 2015 2:03 pm
RogerClark wrote:I only tested the ports which had the on board LEDS connected to them.

RogerClark
Tue Sep 08, 2015 8:28 pm
Martin,

I will need to double check which pins the F407 LEDs are connect to, as was pretty sure they were all working for me


martinayotte
Tue Sep 08, 2015 8:31 pm
Now, I’m checking the USART/UART on F429. Strangely, the USARTs are not working but the UART does work.
I’m not even sure if that problem was already there in my F405 back in May, because I was first using UART4 on my STM32F4Stamp, but rapidly switched to SerialUSB on both this both and Netduino2Plus. So, maybe I didn’t even test USART1/USART2/USART3 on those boards.
The code is again so much different between F1 and F4, maybe the bugs are there since years.
I will continue to dig (and test under F405 to confirm).

martinayotte
Tue Sep 08, 2015 8:33 pm
RogerClark wrote:I will need to double check which pins the F407 LEDs are connect to, as was pretty sure they were all working for me

RogerClark
Tue Sep 08, 2015 8:37 pm
Yes. Thats possible

martinayotte
Wed Sep 09, 2015 1:23 am
I’ve done some tests on my Netduino2Plus and USART2 is working perfectly.
I’m doing tests on STM32F4Stamp in the following minutes, if USART1 and USART3 are working there too, this means it is really a F429 related issue, not an F4xx in general.

EDIT: On STM32F4Stamp, tests for USART2 and USART3 are working there too, but USART1 is not breaked out on this board (neither than Netduino2Plus), except if I re-directed it to some other pins, but I think it is useless.

So, back to SquareOne : I need to figure out why F429 is different … :?


Leave a Reply

Your email address will not be published. Required fields are marked *