Can you program the STM32F429 using the Arduino language/software?

Post here first, or if you can't find a relevant section!
Post Reply
Starless
Posts: 6
Joined: Tue Mar 10, 2020 5:28 pm

Can you program the STM32F429 using the Arduino language/software?

Post by Starless »

Hi,

Currently I am working on a current and temperature controller for laser diodes using 2 Thorlabs chips, one for current and one for temperature. I need to make a GUI on the touchscreen for the user that shows data (such as actual temperature and set current), and that allows the user to configure the settings.

One of the chips uses UART communication, and since I am trying to avoid having to program a serial terminal from zero, I have been looking for options. I was told Arduino has a built-in serial terminal, so I have to only worry about making the GUI for the user. I was also told I could use PlatformIO through VS code.

I was planning on using the 32F746GDISCOVERY for doing the mentioned above, but ended up with the 32F429DISCOVERY, which I dont know if its compatible with Arduino software.

Thank you.
sheepdoll
Posts: 28
Joined: Fri Dec 20, 2019 6:47 pm

Re: Can you program the STM32F429 using the Arduino language/software?

Post by sheepdoll »

I got one of those years ago. Did a lot of my initial conceptual work on it. It works great with a HAL based Arduino like the stm official core. The one limitation is that if one wants to add an ethernet PHY, there are some hoops one has to jump through, like removing the MEMS gyro and having to deal with a line that the LCD shares with the ethernet driver. So far I have not really noticed any interference.
I modded the Adafruit ILI9341 library to use the HAL low level LTDC driver rather than the SPI interface. Way faster. Same for the touch screen controller.


Interesting enough Today I ordered a couple of the STM32F429 Nucleo boards (that have the PHY and an arduino header.) I noticed that there is also a STM32439 Nucleo. Spent part of the day attempting to find out what the difference between the F429 and the F439 is? The only thing I could figure out from the Cube and the data sheet is that the F439 has some extra crypto stuff.
User avatar
fpiSTM
Posts: 912
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 36
Location: Le Mans
Contact:

Re: Can you program the STM32F429 using the Arduino language/software?

Post by fpiSTM »

Currently, there is no variant added for the 32F429DISCOVERY.
This is one requested:
https://github.com/stm32duino/Arduino_C ... issues/722

It misses only to create the variant. Feel free to do it ;)
User avatar
fpiSTM
Posts: 912
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 36
Location: Le Mans
Contact:

Re: Can you program the STM32F429 using the Arduino language/software?

Post by fpiSTM »

For the difference btw F429 and F439:
https://www.st.com/en/microcontrollers- ... 9-439.html

you're right sheepdoll, it seems it is only the crypto part:
The STM32F439 integrates a crypto/hash processor providing hardware acceleration for AES-128, -192 and -256, with support for GCM and CCM, Triple DES, and hash (MD5, SHA-1 and SHA-2)
sheepdoll
Posts: 28
Joined: Fri Dec 20, 2019 6:47 pm

Re: Can you program the STM32F429 using the Arduino language/software?

Post by sheepdoll »

fpiSTM wrote:
Wed Mar 11, 2020 7:12 am
Currently, there is no variant added for the 32F429DISCOVERY.
This is one requested:
https://github.com/stm32duino/Arduino_C ... issues/722

It misses only to create the variant. Feel free to do it ;)
That is strange. I did my initial Arduino HAL scripting with the 32F429DISCOVERY. The testing of the core at the time is actually what lead me to Eclipse. I wound up making a complete copy of the Arduino core as an eclipse project. Sort of made using the Arduino IDE redundant.

The nice thing about using eclipse IDE is that one can create the project in CUBEMX, then convert the project to C++. That allows the direct inclusion of Arduino libraries which are C++ for the most part. The biggest issue with the 32F429DISCOVERY is that almost every pin is used, which does not leave much for the GPIO. This is tempered with that the 32F429DISCOVERY seems to be optimized to show off the LTDC and the chrom-Art Graphic accelerator. In practice one either, blinks the LEDs, or else enables the full blown touch panel. It is fairly easy to modify the Adafruit GFX library as the board support package seems to be based on it from years ago. The calls are pretty much the same, just renamed.

I forget if there is a free serial port. There is a USB port which has no trouble being a CDC class serial driver. (As I recall I got that working first floating the Arduino print() command on top of it.) Saves the need of a converter anyway. There is also the SWO that sends serial back through the ST-LINK USB. Might have been that I got working. The point for the OP, is that it is easy to get Arduino type serial.print() stuff to work either to the touchscreen or the serial backchannel.

I have several of these. One even runs the STM java engine demo, with the cutest little marble in the slot maze that uses the mems sensor to roll the ball. Really shows off what this board can do.
ag123
Posts: 596
Joined: Thu Dec 19, 2019 5:30 am
Answers: 2

Re: Can you program the STM32F429 using the Arduino language/software?

Post by ag123 »

i think the stm32f429 discovery board is a rather popular board, i'd suggest making a variant for it.
the main thing about this board is that it has an lcd on board i think i read somewhere it is an ili9341 but i'm not too sure
the other thing about this board is the 8 MB sdram on board
i think it is a good board to run the official core on given the resources
User avatar
fpiSTM
Posts: 912
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 36
Location: Le Mans
Contact:

Re: Can you program the STM32F429 using the Arduino language/software?

Post by fpiSTM »

sheepdoll wrote:
Wed Mar 11, 2020 7:56 am
That is strange. I did my initial Arduino HAL scripting with the 32F429DISCOVERY. est little marble in the slot maze that uses the mems sensor to roll the ball. Really shows off what this board can do.
[mention]sheepdoll[/mention]
I guess you tried this core ;) :
https://github.com/danieleff/STM32GENER ... s.txt#L695
sheepdoll
Posts: 28
Joined: Fri Dec 20, 2019 6:47 pm

Re: Can you program the STM32F429 using the Arduino language/software?

Post by sheepdoll »

ag123 wrote:
Wed Mar 11, 2020 8:08 am
i think the stm32f429 discovery board is a rather popular board, i'd suggest making a variant for it.
the main thing about this board is that it has an lcd on board i think i read somewhere it is an ili9341 but i'm not too sure
the other thing about this board is the 8 MB sdram on board
i think it is a good board to run the official core on given the resources
+1

The display is an ili9341. There is a great tutorial on the LTDC https://www.youtube.com/watch?v=Mkrrt_EgjHs It is targeted for the STM736Discovery, but it works just as well on the STM32f429Dicovery. One does have to navigate into the board support sections of the demo code and pull the pieces out. This tutorial pretty much shows what files are needed. What makes it easy to deal with is all this code traces it's roots back to the Adafruit GFX library and the core drawing routines which start from drawing a single pixel.

If one wants to dig really deep into the implementation according to the schematics the IMx configuration straps are terminated in a resistor network. The ILI9341 spi is connected to one of the SPI ports. So the display could be run straight up as a SPI display like on other Arduino hardware. Not sure there would be much to gain as the other wires are still connected blocking the GPIO. Same for the touch controller. Most of this would be more of an academic exercise.

I did take a look this morning and see that UART 5 is unconnected.

I suspect, that the reason there is no official core, is it is hard to do a direct mapping to the Arduino headers. STM does have sort of a convention for this going back to the STM32F0 which could be connected to one of the early Adafruit TFT/joystick shields. That demo pretty much determined how ST maps the processors to Arduino. There is a library example in all of the example folders, which looks for a connected joystick then runs the TFT demo. This is written in the old pre-HAL stuff, but the calls are similar.

A more recent tutorial I found on the Adafruit website, when looking how to use the button widgets, is a cellphone! https://learn.adafruit.com/arduin-o-pho ... -cellphone This shield would work nicely with STM32f429Dicovery Or STM736Discovery the and one could have the worlds cheapest phone.
Post Reply

Return to “General discussion”