STM32!

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

jgu1
Posts: 1102
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1003 times
Been thanked: 255 times
Contact:

Re: STM32!

Postby jgu1 » Fri Oct 11, 2019 10:29 am

Thank´s Leigh. I perform a test later this afternoon. First I save the old one.

You hear from me :wink:

Jorgen.

jgu1
Posts: 1102
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1003 times
Been thanked: 255 times
Contact:

Re: STM32!

Postby jgu1 » Fri Oct 11, 2019 5:16 pm

Hi Leigh!

I follow your link, but still no luck, same error. :(

Br Jorgen

User avatar
LeighM
Matrix Staff
Posts: 1911
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: STM32!

Postby LeighM » Fri Oct 11, 2019 6:13 pm

Very odd.
I will add some diagnostics into the file on Monday.
If you can then retry
Thanks
Leigh
These users thanked the author LeighM for the post:
jgu1 (Fri Oct 11, 2019 6:36 pm)
Rating: 5.26%
 

jgu1
Posts: 1102
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1003 times
Been thanked: 255 times
Contact:

Re: STM32!

Postby jgu1 » Fri Oct 11, 2019 6:37 pm

Thank you. Yes I will do all test. It would be nice to get it work Have a nice weekend...………

Jorgen

User avatar
LeighM
Matrix Staff
Posts: 1911
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: STM32!

Postby LeighM » Mon Oct 14, 2019 8:52 am

Hi Jorgen,

Sorry, looks like something has slipped through the net here, the path in our batch file does match the installation location for the ST-LINK programmer.
Could you please try the attached updated batch file?
This is to go into …
C:\Program Files (x86)\Flowcode\Common\Compilers\starm\batch

This new batch file assumes that the ST-LINK_CLI.exe is located in this directory …
C:\Program Files (x86)\Flowcode v8\tools\ST-LINK Utility
If you could just check that is the case for your installation.

Thanks!
Leigh
Attachments
stm32prog.bat
(474 Bytes) Downloaded 14 times
These users thanked the author LeighM for the post:
jgu1 (Mon Oct 14, 2019 4:51 pm)
Rating: 5.26%
 

jgu1
Posts: 1102
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1003 times
Been thanked: 255 times
Contact:

Re: STM32!

Postby jgu1 » Mon Oct 14, 2019 4:51 pm

Hi Leigh!

Doesn´t work.

But I found the file ST-LINK_CLI.exe in: C:\Program Files\Flowcode v8\tools\ST-LINK Utility

Not in: (x86)\Flowcode v8\tools\ST-LINK Utility

This here is on an "little" older pc, but still Win10. Is it maybe possible to without danger to copy the diretory TOOL in the (x86) directory?

I will test it on my newer PC later this evening.

Later :lol: :lol: :wink: :

Yes Leigh, finally I am able to program the STM32F0308 Discoveery board on my other PC :wink: On this pc the ST-LINK_CLI.exe is located ac you mentioned.

So, please what do I do in the other PC, is it ok to copy the TOOL lib. into the (x86) lib without destroy anything for other device???

Later again: Unfortunately I am not able to program the STM32F410 Nucleo-64 :(

I am grateful for your help.

Br Jorgen.

User avatar
LeighM
Matrix Staff
Posts: 1911
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: STM32!

Postby LeighM » Tue Oct 15, 2019 7:49 am

Hi Jorgen,
Yes, you can copy the tools directory.
Or edit the path in stm32prog.bat

The Nucleo boards are programmed differently, they do integrate the ST-LINK programmer,
but the default setting is to appear as an external drive when plugged into the PC USB port.
And that is used by Flowcode in the case of a Nucleo board selected as the target.
Leigh
These users thanked the author LeighM for the post:
jgu1 (Tue Oct 15, 2019 6:15 pm)
Rating: 5.26%
 

User avatar
LeighM
Matrix Staff
Posts: 1911
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: STM32!

Postby LeighM » Tue Oct 15, 2019 11:45 am

Hi Jorgen,
Well this is curious, it turns out that the issues regarding ST-LINK and stm32prog.bat are due to the website STARM Toolchain download file not being an up to date version.
We are getting this fixed asap
Leigh
These users thanked the author LeighM for the post:
jgu1 (Tue Oct 15, 2019 6:15 pm)
Rating: 5.26%
 

jgu1
Posts: 1102
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1003 times
Been thanked: 255 times
Contact:

Re: STM32!

Postby jgu1 » Tue Oct 15, 2019 6:11 pm

Hi Leigh!

Does it mean that there also is a chance to be able to program the Nucleo also? And these correction will they also be pushed to update via help?

Thank´s in advance.

Br Jorgen

User avatar
LeighM
Matrix Staff
Posts: 1911
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: STM32!

Postby LeighM » Wed Oct 16, 2019 8:02 am

Hi Jorgen,

For the Discovery board (that uses ST-Link) I would suggest that you copy the attached bat file into the batch directory normally at:
C:\Program Files (x86)\Flowcode\Common\Compilers\starm\batch
(If the batch directory is in a different place on your other PC then that is not a problem)

Then copy the whole of the “ST-LINK Utility” subdirectory (from tools) into the starm directory:
C:\Program Files (x86)\Flowcode\Common\Compilers\starm
Which should then look like this ...

starm.jpg
starm.jpg (47.63 KiB) Viewed 941 times

The Discovery board programming should now work well on both PCs

When I have confirmation that the correct STARM toolchain pack is on the website, downloading and installing this will achieve the same as the above changes.


Next ...
The Nucleo boards (with default settings) work differently, what happens when you plug it into the USB?

Thanks
Leigh
Attachments
stm32prog.bat
(442 Bytes) Downloaded 10 times
These users thanked the author LeighM for the post:
jgu1 (Thu Oct 17, 2019 3:59 pm)
Rating: 5.26%
 

jgu1
Posts: 1102
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1003 times
Been thanked: 255 times
Contact:

Re: STM32!

Postby jgu1 » Wed Oct 16, 2019 6:45 pm

Hi Leigh!

You rote:
"When I have confirmation that the correct STARM toolchain pack is on the website, downloading and installing this will achieve the same as the above changes."
So this mean that a new toolchain for STARM will soon come and this will make the correction as you mentioned automatic? In that case I wait until new update.Please let us know when this will be on. :wink: At least now I can program the Discoboard from one PC :D

Nucleo:

When I attach the USB I says: NODE410 (E:) decide what to do with this drive. And I have att. my testprogram for the Nucleo.
hope i'm not in too much trouble :wink:

Br jorgen.
Attachments
STMF410Test.msg.txt
(52.79 KiB) Downloaded 11 times
STMF410Test.fcfx
(6.37 KiB) Downloaded 13 times
USB.PNG
USB.PNG (11.81 KiB) Viewed 929 times

User avatar
LeighM
Matrix Staff
Posts: 1911
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: STM32!

Postby LeighM » Thu Oct 17, 2019 10:04 am

Hi Jorgen,
The updated STARM Toolchain is now on the website.
Looks like there is a problem with the Nucleo 410, I'm currently looking into it
Leigh
These users thanked the author LeighM for the post:
jgu1 (Thu Oct 17, 2019 3:58 pm)
Rating: 5.26%
 

User avatar
LeighM
Matrix Staff
Posts: 1911
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: STM32!

Postby LeighM » Thu Oct 17, 2019 10:24 am

Hi Jorgen,
Please can you update to the attached FCD file for the F410 Nucleo64, to go into:
C:\ProgramData\MatrixTSL\FlowcodeV8\FCD\ARM
I will get this into the update system tomorrow.
Thanks
Leigh
Attachments
32F410Nucleo64.fcdx
(24.66 KiB) Downloaded 11 times
These users thanked the author LeighM for the post:
jgu1 (Thu Oct 17, 2019 3:58 pm)
Rating: 5.26%
 

jgu1
Posts: 1102
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1003 times
Been thanked: 255 times
Contact:

Re: STM32!

Postby jgu1 » Thu Oct 17, 2019 3:57 pm

Hi again Leigh!

I can´t find th link: C:\ProgramData\MatrixTSL\FlowcodeV8\FCD\ARM. So not able to test today, I wait until tomorrow when I get it via update.
Thank´s in advance.

Br Jorgen

User avatar
LeighM
Matrix Staff
Posts: 1911
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: STM32!

Postby LeighM » Thu Oct 17, 2019 4:02 pm


C:\ProgramData\
is usually a hidden directory,
you might need to change folder options

or wait until tomorrow

jgu1
Posts: 1102
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1003 times
Been thanked: 255 times
Contact:

Re: STM32!

Postby jgu1 » Thu Oct 17, 2019 6:45 pm

Hi Leigh!

I have just installed the new toolchain on two PC. The Discovery board is still progammable, perect :D

Look forward to test the Nuclea tomorrow after update.

When it work, I have some question regarding the config setup, hope it´s ok :wink:

Br Jorgen

jgu1
Posts: 1102
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1003 times
Been thanked: 255 times
Contact:

Re: STM32!

Postby jgu1 » Fri Oct 18, 2019 2:03 pm

Hi Leigh!

Yes, after update, testing the Nucleo also, programming perfect, working. :D You MM guy´s and Valued Contributor are amazing…...

Now I have to figure out to set the settings in config, how I use the PLL ect. I want it to be fast as possible. I´ll see if I can speed the Ili9341 up a bit.

Again thank´s and have a nice weekend.

Br Jorgen

jgu1
Posts: 1102
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1003 times
Been thanked: 255 times
Contact:

Re: STM32!

Postby jgu1 » Mon Oct 21, 2019 5:02 pm

Hi Leigh.

I made some test. I have test the Nucleo with an ILI9341. And compared with different Arduino Devices, I think the Ili9341 updating with Nucleo is twice as fast than the other devices waov :lol: And output is 3,3V so it is easy to connect. So, really powerfull.

I made also a test with Arduino Mega Eico by turning an output on and off ith a delay of 1 MicroSec. see att. I measure with my scope:

Nucleo : Exactly 1 uSec. :D

Arduino Mega : approx. 2,2 uSec.

Eico: approx. 3 uSec.

I am not sure that it is the rigth way to test the speed versus correct timing. But look like :lol:

I see in the config there are lot of setting, with PLL and ect. I have no experience with these. Could you please have a look at the att. program, maybe it is possible to speed it further up :wink:

Thank´s in advance

Jorgen
Attachments
Speedtest.PNG
Speedtest.PNG (16.79 KiB) Viewed 803 times
Nucleo Testing.fcfx
(16.76 KiB) Downloaded 11 times
These users thanked the author jgu1 for the post:
LeighM (Tue Oct 22, 2019 8:21 am)
Rating: 5.26%
 

User avatar
LeighM
Matrix Staff
Posts: 1911
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: STM32!

Postby LeighM » Tue Oct 22, 2019 8:20 am

Hi Jorgen,
Yes, that looks fine, and you are running at max :D
ST have a good tool that helps with clock configuration....
https://www.st.com/en/development-tools ... ubemx.html
These users thanked the author LeighM for the post:
jgu1 (Wed Oct 23, 2019 5:45 am)
Rating: 5.26%
 

jgu1
Posts: 1102
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1003 times
Been thanked: 255 times
Contact:

Re: STM32!

Postby jgu1 » Wed Oct 23, 2019 5:45 am

Hi Leigh!

Thank you.

Br Jorgen

Alkaline
Posts: 66
Joined: Mon Aug 20, 2018 11:04 am
Has thanked: 21 times
Been thanked: 22 times
Contact:

Re: STM32!

Postby Alkaline » Mon Oct 28, 2019 9:47 am

Hi to All

Following the instructions I managed to correctly program the stm32f411e discovery

I tried playing a little with the clocks and setting it to maximum (100MHz) I managed to get 8MHz of toogle on the pins.

I am comparing this new mcu with the current pic32mx470 we are using for our projects.

From the first tests I noticed this:
although the speed of toggle pin is equal to twice that obtained with pics, the writing speed of the display is slightly lower. (Ili9341)
Especially the clear that the pic executes it instantaneously, on the stm32 it takes us almost 0.5s.

The display is connected in parallel mode 8 bits in both cases.
Last edited by Alkaline on Mon Oct 28, 2019 11:23 am, edited 1 time in total.

User avatar
LeighM
Matrix Staff
Posts: 1911
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: STM32!

Postby LeighM » Mon Oct 28, 2019 11:21 am

This is probably due to our use of the ST HAL for I/O
These users thanked the author LeighM for the post:
Alkaline (Mon Oct 28, 2019 2:20 pm)
Rating: 5.26%
 

Alkaline
Posts: 66
Joined: Mon Aug 20, 2018 11:04 am
Has thanked: 21 times
Been thanked: 22 times
Contact:

Re: STM32!

Postby Alkaline » Mon Oct 28, 2019 2:23 pm

LeighM wrote:This is probably due to our use of the ST HAL for I/O


Do you have suggestions to improve the speed with the display?

Can I try to do something ??

with pic32mx I had to insert some c code to set the clocks etc correctly in order to get the required performance

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1161
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 357 times
Been thanked: 572 times
Contact:

Re: STM32!

Postby QMESAR » Mon Oct 28, 2019 4:03 pm

Hi
just as a note your test with the Pin toggel on the PIC32 is horribly wrong if you search on the Microchip web site/Forum you will find some C code which they ran and people use to test the clock speeds this code yields 70 Mhz on a pin toggle :D so don't be so happy that the STM is showing faster speeds(joke)the PIC eat a STM for breakfast if used as intended :D
what peripheral clock speed setting you use on the PIC32? that matter a big deal!
These users thanked the author QMESAR for the post:
Alkaline (Mon Oct 28, 2019 4:14 pm)
Rating: 5.26%
 

Alkaline
Posts: 66
Joined: Mon Aug 20, 2018 11:04 am
Has thanked: 21 times
Been thanked: 22 times
Contact:

Re: STM32!

Postby Alkaline » Mon Oct 28, 2019 4:28 pm

QMESAR wrote:what peripheral clock speed setting you use on the PIC32? that matter a big deal!


The pbclk is set to 20 MHz while the SYSlClock is set to 40 MHz

In my application I tried to set the clock to maximum but I didn't get a improvement.