Hi Ben
STM32F469I-DISCO Boardis already included as a target in Flowcode.
It's working nice and it's easy to flash. no additional hardware is required.
And to program several boards just drag and drop the bin file onto the virtual drive of the connected board.
But...
There is a small problem with the clock.
I2C (1Mhz) speed and UART (921600 Baud) are perfect
The display clock from the HSI bus is probably wrong, there is interference in the display.
If I change the clockspeed to 16Mhz, the interference is gone but I2C and Uart are then to slow.
Clock to high or low':
For a 200Hz interrupt choose 20Hz.....
STM32F469I-DISCO Board clock setup
-
- Valued Contributor
- Posts: 909
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 181 times
- Been thanked: 208 times
-
- Valued Contributor
- Posts: 421
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 76 times
- Been thanked: 232 times
Re: STM32F469I-DISCO Board clock setup
Looks like this Discovery board has an 8MHz crystal, so if you select HSE then the Flowcode settings clock speed needs to be set to 8MHz.
If you use the STM32F469NI internal source (HSI) then the setting needs to be 16MHz.
If you need to tinker with the internal clocks (and there are a few of them!) via the Flowcode Project Options, then you at least need to look at the STM32F469NI reference manual (RM0386)
or better still use the clock configurator of STM32CubeMX.
Otherwise you risk overclocking and possible failure.
Regarding timer interrupts, that Flowcode dialog does not properly calculate timings for STM32 devices, as it isn't aware of the internal clock complexities. Prescaler and roll over values need to be determined manually, once you know the frequency of the internal APB2 timer clock.
Hope that helps.
If you use the STM32F469NI internal source (HSI) then the setting needs to be 16MHz.
If you need to tinker with the internal clocks (and there are a few of them!) via the Flowcode Project Options, then you at least need to look at the STM32F469NI reference manual (RM0386)
or better still use the clock configurator of STM32CubeMX.
Otherwise you risk overclocking and possible failure.
Regarding timer interrupts, that Flowcode dialog does not properly calculate timings for STM32 devices, as it isn't aware of the internal clock complexities. Prescaler and roll over values need to be determined manually, once you know the frequency of the internal APB2 timer clock.
Hope that helps.
-
- Valued Contributor
- Posts: 909
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 181 times
- Been thanked: 208 times
Re: STM32F469I-DISCO Board clock setup
Hi Leigh
Yes I found the 8Mhz on board.
If the IRQ is 10 times wrong it's OK. I can handle this.
I found the Clock conficurator but the Flowcode Project Options dont support all (or the required parameter)
How the display look with 8Mhz but with 16Mhz it's ok
Yes I found the 8Mhz on board.
If the IRQ is 10 times wrong it's OK. I can handle this.
I found the Clock conficurator but the Flowcode Project Options dont support all (or the required parameter)
How the display look with 8Mhz but with 16Mhz it's ok
-
- Valued Contributor
- Posts: 909
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 181 times
- Been thanked: 208 times
Re: STM32F469I-DISCO Board clock setup
Hi Leigh
The error in the display occurs at startup if the "clock speed defines delay related timings" is set to 8 Mhz (8Mhz is correct).
and remains until I remove the power plug.
Even a new flashing with 16Mhz does not change anything. Once wrong, always wrong
But if I first load a program with 16Mhz and then flash programs with 8Mhz it is ok.
I suspect it goes wrong when I plug in the power plug and starting the Board.
The "reset on power" from the display, or the speed is too high during this time
But I have no possibility to change anything.
The error in the display occurs at startup if the "clock speed defines delay related timings" is set to 8 Mhz (8Mhz is correct).
and remains until I remove the power plug.
Even a new flashing with 16Mhz does not change anything. Once wrong, always wrong
But if I first load a program with 16Mhz and then flash programs with 8Mhz it is ok.
I suspect it goes wrong when I plug in the power plug and starting the Board.
The "reset on power" from the display, or the speed is too high during this time
But I have no possibility to change anything.
-
- Valued Contributor
- Posts: 909
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 181 times
- Been thanked: 208 times
Re: STM32F469I-DISCO Board clock setup
Hi Leigh
Do you already have an idea how to solve the problem with the display?
I could try a trial version if that would help.
Do you already have an idea how to solve the problem with the display?
I could try a trial version if that would help.
-
- Valued Contributor
- Posts: 421
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 76 times
- Been thanked: 232 times
Re: STM32F469I-DISCO Board clock setup
At a guess, it looks like the issue could be related to display setup, perhaps delay related? or SPI settings?
Could you post your project, or part of it, that demonstrates the issue?
Could you post your project, or part of it, that demonstrates the issue?
-
- Valued Contributor
- Posts: 909
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 181 times
- Been thanked: 208 times
Re: STM32F469I-DISCO Board clock setup
Hi Leigh
If I use 8Mhz both program generate a bad display
If I use 16Mhz both program are ok, but Uart and I2C clock are wrong
In my program I removed the IMU so you don't need to connect it
With this program I get the bad display. (tested on several board)
Sometimes the error only occurs when the board is restarted with my program. Resetting then does not help, it resets and restarts but the display is still bad. With a simple program the same problem
I have tested several times
If I use 8Mhz both program generate a bad display
If I use 16Mhz both program are ok, but Uart and I2C clock are wrong
In my program I removed the IMU so you don't need to connect it
With this program I get the bad display. (tested on several board)
Sometimes the error only occurs when the board is restarted with my program. Resetting then does not help, it resets and restarts but the display is still bad. With a simple program the same problem
I have tested several times
-
- Valued Contributor
- Posts: 421
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 76 times
- Been thanked: 232 times
Re: STM32F469I-DISCO Board clock setup
Looks like the display code uses STM libraries so not sure what's going on here.
Maybe try running the device system clock slower and see if that improves things?
e.g. change your PLLN from 360 to 180
Otherwise this is going to need help from Matrix (as I don't have a disco board to test)
Maybe try running the device system clock slower and see if that improves things?
e.g. change your PLLN from 360 to 180
Otherwise this is going to need help from Matrix (as I don't have a disco board to test)
-
- Valued Contributor
- Posts: 909
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 181 times
- Been thanked: 208 times
Re: STM32F469I-DISCO Board clock setup
That makes it worse, like not synch, nothing to read
change your PLLN from 360 to 180