[STM32GENERIC] F429i Discovery

ChrisMicro
Tue Jun 20, 2017 9:55 am
I just saw that huaweix has added support for all components of the F429i Discovery board.
There is also a demo but I don’t know how to compile it because it does not appear in the examples menu.

Has anybody an idea?


danieleff
Tue Jun 20, 2017 11:16 am
Its just a copy from examples in the F4 firmware http://www.st.com/en/embedded-software/stm32cubef4.html

It is good to look at those examples, but really not the arduino way. At all.

For example, if that board really has ILI9341 on SPI, than the Adafruit ILI9341 just works (After setting the correct SPI.stm32SetInstance(SPIx), SPI.stm32SetMOSI(…) …), and you don’t need anything else.

Oh how I wish I had that board…


ChrisMicro
Tue Jun 20, 2017 2:44 pm

For example, if that board really has ILI9341 on SPI, than the Adafruit ILI9341 just works

That would be much too easy and I would have done an example long time ago.
It is parallel ( p.34 ).

Oh how I wish I had that board…

In my opinion you should ask STM. They shall give you one for free.
Its worth is 1/2 hour firmware developers work and I think you invested a little bit more than 1/2 hour in this project ;-)


ChrisMicro
Wed Jun 21, 2017 9:17 am
Meanwhile “huaweix” has a working example which drives the display ;)

He set the path separate to our examples directory and added all necessary libraries.
Probably that’s a quite good strategy to have all the important libraries related to the board in its location.

Daniel, what do you think? It would probably very good to include the work of huaweix quite soon in the repo.


danieleff
Wed Jun 21, 2017 10:00 am
Again, it is just the firmware examples. Download the firmware, and you get examples for everything.
It is fine if you do your own project without arduino.
But look at the code!
#define LED3_PIN GPIO_PIN_13
#define LED3_GPIO_PORT GPIOG
#define LED3_GPIO_CLK_ENABLE() __GPIOG_CLK_ENABLE()
#define LED3_GPIO_CLK_DISABLE() __GPIOG_CLK_DISABLE()

ChrisMicro
Wed Jun 21, 2017 11:37 am
Hi Daniel,

I saw that it is quite unclean, but at least the display was working.
So there seems to be a change to use the display driver without to much effort.
I know you don’t have the board … I tried to send STM a message that the should provide you one.

About library compatibility: I will open a general thread regarding all frameworks.

Cheers,
Christoph


ChrisMicro
Fri Jun 30, 2017 9:11 am
I’ve just added a Adafruit-GFX compatible wrapper and two examples.

Now the Adafruit-GFX functions can be used for the graphics.


danieleff
Fri Jun 30, 2017 10:08 am
FYI ST wants to create individual repos for “hardware features” of their boards https://github.com/stm32duino/Arduino_C … /issues/48

If the do, and only use HAL, than I will “use” those too, so it will be their responsibility to create and maintain the libraries ;-P


fpiSTM
Fri Jun 30, 2017 3:16 pm
[danieleff – Fri Jun 30, 2017 10:08 am] –
If the do, and only use HAL, than I will “use” those too, so it will be their responsibility to create and maintain the libraries ;-P

We also accept contribution/suggestion, it’s an open source project ;) All contributors/contributions are welcome. :mrgreen:


ChrisMicro
Fri Jun 30, 2017 4:38 pm
It is probably a good idea to separate the board drivers in another github repo.
Probably it can speed up the development process.
The most important thing is in that case that there is a description on how to install both repos.
Usually I simply make “git clone” because than I can make changes in my repo very quick but I don’t know how this collides with an installation by the board manager … if you could just describe the “work flow” …

fpiSTM
Fri Jun 30, 2017 7:16 pm
[ChrisMicro – Fri Jun 30, 2017 4:38 pm] –
if you could just describe the “work flow” …

This is planned. A simple git clone will be enough ;)


zmemw16
Fri Jun 30, 2017 10:34 pm
not sure if this phrased correctly.

will the boards repo have the current repo (probably shrunken in size) as module(s) ?

stephen


fpiSTM
Sat Jul 01, 2017 8:52 am
Goal is to make them available througt the Arduino libraries manager. But for advanced user a simple git clone in the libraries directory will be enough…
@chrismicro you would like to know the wow?

ChrisMicro
Sun Jul 02, 2017 5:08 am
@chrismicro you would like to know the wow?

Hmm, I do not understand wow. :shock:

wow?


fpiSTM
Sun Jul 02, 2017 5:50 am
way of working ;)

ChrisMicro
Sun Jul 02, 2017 7:45 am
yes, probably you can make a description:

– links to the repos
– how to cooperate


ChrisMicro
Wed Jul 05, 2017 3:59 am
FYI ST wants to create individual repos for “hardware features” of their boards https://github.com/stm32duino/Arduino_C … /issues/48

If the do, and only use HAL, than I will “use” those too, so it will be their responsibility to create and maintain the libraries ;-P

Is something going on in this direction? I don’t know if there is any repository.


fpiSTM
Wed Jul 05, 2017 3:43 pm
First repo for Ethernet has been created.
Some other will come. And if you have any one you think which should be good to add do not hesitate to ask.
Then we could create a repo or fork one to update it.
It an open subject which need to be developed.

ChrisMicro
Wed Jul 05, 2017 5:05 pm
First repo for Ethernet has been created.
Link please :D

Some other will come. And if you have any one you think which should be good to add do not hesitate to ask.
Then we could create a repo or fork one to update it.

I understood it this way that hardware peripherals for various boards like the STM32F746 will be supported.
For me the most important would be that the STM32F7 disco and F4 disco will be functioning.
And than I don’t know if Daniel would transfer for e.g. the TFT for the F7 disco to the new repo.


fpiSTM
Fri Jul 07, 2017 9:14 am
https://github.com/stm32duino/STM32Ethernet
https://github.com/stm32duino/LwIP

Currently under Pulls request is under review


danieleff
Wed Jul 12, 2017 3:01 pm
With some PinMap magic glue code, ethernet compiles, just
WARNING: library LwIP claims to run on [stm32] architecture(s) and may be incompatible with your current board which runs on [STM32] architecture(s).
WARNING: library STM32Ethernet claims to run on [stm32] architecture(s) and may be incompatible with your current board which runs on [STM32] architecture(s).

zmemw16
Wed Jul 12, 2017 4:15 pm
aren’t those from the library.properties file ?
add ‘,stm32’ to the architectures line
stephen

fpiSTM
Wed Jul 12, 2017 5:04 pm
it’s case sensitive ;) maybe we could add ‘,STM32’ in the library.properties
Fine if it’s both compatible. That’s why I would like one repo for each lib and not integrate it in the core ;)

ChrisMicro
Sat Sep 16, 2017 6:39 am
Because daniel has meanwhile done some work for the F429 disco, I added a TFT voltmeter example.

It reads the voltage from PA0 and displays it. PA0 is connected to the blue button of the board. I you press the button the displayed voltage changes to 3.3V.
I have tried other pins e.g. PA1 but there seems to be a driver problem. PA1 shows always ‘0’.


ChrisMicro
Mon Sep 18, 2017 8:35 pm
I tried to find the touch controller which should be connected to I2C3 with the scanner.
But it does not respond. So either there is a fault in my scanner configuration or there is a problem with the I2C3 implementation.
Because I tried to measure the I2C3 signals wiht the oscilloscope on PA8 and PC9 and there where no signaIs, I think there is a problem with the I2C implementaion

Anny idea?:

#include <Wire.h>

#define SERIALINTERFACE Serial

void setup()
{
//Wire.begin();
Wire.stm32SetInstance(I2C3);
Wire.stm32SetSDA(PC9);
Wire.stm32SetSCL(PA8);

//enableDevices();

SERIALINTERFACE.begin(115200);
delay(5000);
SERIALINTERFACE.println("\nI2C Scanner");
}

void loop()
{
byte error, address;
int nDevices;

SERIALINTERFACE.println("Scanning...");
delay(2000);

nDevices = 0;
for (address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
Wire.write(0);
error = Wire.endTransmission();

if (error == 0)
{
SERIALINTERFACE.print("I2C device found at address 0x");
if (address < 16) SERIALINTERFACE.print("0");
SERIALINTERFACE.print(address, HEX);
SERIALINTERFACE.println(" !");

nDevices++;

}
else if (error == 4)
{
SERIALINTERFACE.print("no device found at address 0x");
if (address < 16) SERIALINTERFACE.print("0");
SERIALINTERFACE.println(address, HEX);
}
}
if (nDevices == 0)
{
SERIALINTERFACE.println("No I2C devices found\n");
SERIALINTERFACE.println("Did you configure the chip select for your device?\n");
}
else
SERIALINTERFACE.println("done\n");

delay(5000); // wait 5 seconds for next scan
}


TFTLCDCyg
Mon Sep 18, 2017 9:33 pm
In the same line that the ChrisMicro question, about the F429I-DISCO board:

Is it possible to remap the full GPIO with STM32CubeMX in order to activated I2C2, I2C3, SDIO, SPI4, SPI5 or SPI6 for example?


danieleff
Tue Sep 19, 2017 5:11 am
1. Is it an already existing library that is not written by you, that is dumb and only knows about the first instance of Wire?
void setup() {
Wire.stm32SetInstance(I2C3);
Wire.stm32SetSDA(PC9);
Wire.stm32SetSCL(PA8);

DumbLibrary.begin(); // dumb library does not know that the chip has multiple I2C, and thinks there is only Wire. What a shame... READ THE LIBRARY DOCUMENTATION
// THE PREVIOUS LINE WILL CALL Wire.begin() !!!
}


ChrisMicro
Tue Sep 19, 2017 12:30 pm
Chris you forgot to call Wire.begin()
Damn it .. I looked 10 times and didn’t see :(

But thanks :D
Here I made the new TFT touch screen example


ChrisMicro
Fri Jun 22, 2018 8:04 pm
Because I had a little time, I made an I2S example.
It seems, that all pins are somehow shared with other Peripherals. The I2S works, but I found only a solution where the TFT can not be used:
https://github.com/ChrisMicro/STM32GENE … overy429ZI

I added also an oscilloscope example in the TFT folder.


Leave a Reply

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