Hy,
I tested the new ARM core pcb.
Very slow IO speed.
Nucleo - 635.8 kHz
Arduino nano-1.6MHz
What's the problem?
Why is faster an 8bit 16MHz controller than a 32bit 200MHz controller?
STM32F746-NUCLEO slow IO
Moderator: Benj
- STibor
- Posts: 263
- Joined: Fri Dec 16, 2011 3:20 pm
- Has thanked: 116 times
- Been thanked: 113 times
- Contact:
STM32F746-NUCLEO slow IO
- Attachments
-
- arduino vs arm.jpg (95.9 KiB) Viewed 7779 times
-
- arduino_nano_IO_test_1.fcfx
- (7.84 KiB) Downloaded 204 times
-
- stm32f746zg_IO_test_1.fcfx
- (7.94 KiB) Downloaded 214 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: STM32F746-NUCLEO slow IO
Hi,
This is due to our use of the ST HAL libraries, which add flexibility, but lose efficiency.
In view of this we did change the bit setting to not use HAL, but direct access code instead.
However it looks like the Output Icon is using the port mask setting code, I will need to investigate why that is the case.
In the meantime you could force the use of bit setting code, which is faster, by accessing the pin via a property...
Hope that helps.
Leigh
This is due to our use of the ST HAL libraries, which add flexibility, but lose efficiency.
In view of this we did change the bit setting to not use HAL, but direct access code instead.
However it looks like the Output Icon is using the port mask setting code, I will need to investigate why that is the case.
In the meantime you could force the use of bit setting code, which is faster, by accessing the pin via a property...
Hope that helps.
Leigh
- STibor
- Posts: 263
- Joined: Fri Dec 16, 2011 3:20 pm
- Has thanked: 116 times
- Been thanked: 113 times
- Contact:
Re: STM32F746-NUCLEO slow IO
Hello!
Thanks, this works.
9MHz IO frequency.
The total port write is only 206-209kHz.
Thanks, this works.
9MHz IO frequency.
The total port write is only 206-209kHz.
- Attachments
-
- stm32f746zg_full_port_test_1.fcfx
- (8.14 KiB) Downloaded 200 times
- STibor
- Posts: 263
- Joined: Fri Dec 16, 2011 3:20 pm
- Has thanked: 116 times
- Been thanked: 113 times
- Contact:
Re: STM32F746-NUCLEO slow IO
Hello!STibor wrote:Hello!
The total port write is only 206-209kHz.
Do you have a solution to increase port and full port speed?
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: STM32F746-NUCLEO slow IO
Hi,
Have you any particular scenario that you want to improve?
The time to write to port could be improved, but the main issue is the time to setup the port configuration, such as data direction etc.
To simplify use for most users we do the setup as part of the output icon functionality.
If you use an icon to set the port into output mode, the fastest way to then write to the port would be a C icon..
That would not simulate, but would it be the best answer for your intended use?
If not, I'll continue seeing what I can tweak out of the code.
Have you any particular scenario that you want to improve?
The time to write to port could be improved, but the main issue is the time to setup the port configuration, such as data direction etc.
To simplify use for most users we do the setup as part of the output icon functionality.
If you use an icon to set the port into output mode, the fastest way to then write to the port would be a C icon..
Code: Select all
PORTA->ODR = x;
If not, I'll continue seeing what I can tweak out of the code.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: STM32F746-NUCLEO slow IO
Please try this (drop it into .. Flowcode7\CAL\STARM)
- Attachments
-
- STARM_CAL_IO.h
- (4.84 KiB) Downloaded 211 times
- STibor
- Posts: 263
- Joined: Fri Dec 16, 2011 3:20 pm
- Has thanked: 116 times
- Been thanked: 113 times
- Contact:
Re: STM32F746-NUCLEO slow IO
Thanks for your help!LeighM wrote:Please try this (drop it into .. Flowcode7\CAL\STARM)
Using the modified file, the 8-bit output is about three times faster.
Can not write direct port for 16 bit output? Do you need bit shift operations?
I would like to use a graphical display (SSD1289 or higher resolution LCD).
I'm afraid it will be slow.
Fast microcontroller, the IO operation slows down.
What is the FPS value of the STM32F746 Discovery's GLCD display?
Do you use the internal LCD driver of your ARM or have a software drive?
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: STM32F746-NUCLEO slow IO
Thanks for the feedbackThanks for your help!
Using the modified file, the 8-bit output is about three times faster.
Flowcode treats 16 bit ports as a high and low 8 bit port.Can not write direct port for 16 bit output? Do you need bit shift operations?
You could write a full 16 bit port using a C icon or calculation icon referencing the $PORT variable.I would like to use a graphical display (SSD1289 or higher resolution LCD).
I'm afraid it will be slow.
Fast microcontroller, the IO operation slows down.
Don't know, I would have to look that up in the ST docsWhat is the FPS value of the STM32F746 Discovery's GLCD display?
Both, the gLCD component draws the font glyphs, such that our gLCD displays are similar.Do you use the internal LCD driver of your ARM or have a software drive?
We use the ST BSP LCD drivers to plot the points
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: STM32F746-NUCLEO slow IO
Ben has just shown me a full 16 bit port feature in Flowcode, here is how to do it ...Can not write direct port for 16 bit output? Do you need bit shift operations?
So I've also optimized the CAL to support a fast write for this, updated CAL attached.
I intend to give all the ST IO (.h and .c) files similar improvement, at some point
Hope it helps,
Leigh
- Attachments
-
- STARM_CAL_IO.h
- (4.98 KiB) Downloaded 195 times