STM32F469I-DISCO Board clock setup

For general Flowcode discussion that does not belong in the other sections.
stefan.erni
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

STM32F469I-DISCO Board clock setup

Post by stefan.erni »

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.
2024-10-23_14-49-24.PNG
2024-10-23_14-49-24.PNG (598 KiB) Viewed 2775 times

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.
2024-10-23_15-00-20.PNG
2024-10-23_15-00-20.PNG (18.77 KiB) Viewed 2775 times
Clock to high or low':
2024-10-23_14-44-54.PNG
2024-10-23_14-44-54.PNG (166.68 KiB) Viewed 2775 times


For a 200Hz interrupt choose 20Hz.....
2024-10-23_14-14-00.PNG
2024-10-23_14-14-00.PNG (36.14 KiB) Viewed 2775 times

LeighM
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

Post by LeighM »

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.

stefan.erni
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

Post by stefan.erni »

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)
2024-10-24_14-04-01.PNG
2024-10-24_14-04-01.PNG (156.88 KiB) Viewed 2741 times
How the display look with 8Mhz but with 16Mhz it's ok
IMG_3566_2.jpg
IMG_3566_2.jpg (196.7 KiB) Viewed 2741 times

stefan.erni
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

Post by stefan.erni »

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.

2024-11-05_10-39-16.PNG
2024-11-05_10-39-16.PNG (13.3 KiB) Viewed 2315 times

LeighM
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

Post by LeighM »

This looks like a display component issue then.
I can't help just at the moment, I'm not near my pc/lab/office/hobbyroom :)

stefan.erni
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

Post by stefan.erni »

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.

LeighM
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

Post by LeighM »

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?

stefan.erni
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

Post by stefan.erni »

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
2024-12-03_14-22-11.PNG
2024-12-03_14-22-11.PNG (28.2 KiB) Viewed 1511 times

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.
FC10_STM32_F469_post.fcfx
(76.41 KiB) Downloaded 64 times
With a simple program the same problem
I have tested several times
FC_STM32F469_2.fcfx
(11.53 KiB) Downloaded 63 times

LeighM
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

Post by LeighM »

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)

stefan.erni
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

Post by stefan.erni »

That makes it worse, like not synch, nothing to read
change your PLLN from 360 to 180

Post Reply