cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4 Family performance enhancement!

hamdi.najoua
Associate III

Hello Community,

This post purpose is to inform you that the STM32G4 Flash is recharacterized. The Flash speed is increased from 20MHz to 34MHz in boost mode and to 30MHz in normal mode.

Thus, the maximum number of wait-states is reduced from 8 to 4 wait states and so it is possible to achieve 170MHz in boost mode, at only 4 wait-states. This ensures up to 70% of performance gain when the Flash is used in dual bank mode (64-bit read access).

The new wait-state matrix is applicable to all STM32G4 families products and is available in the STM32G4 reference manual RM0440.

This new specification will be taken into account in the STM32CubeG4 next version planned for W26.

It is still possible to increase performance by using the Flash single mode (128-bit). This is applicable only to STM32G47x/G48x devices.

The STM32G4 has been designed to manage control applications. Therefore the best way to get maximum performance from STM32G4 series is to run critical code loops from the CCM-SRAM.

The consumption firmware, used to provide the datasheet consumption figures, fully runs from ART, so the number of wait-states doesn’t influence the consumption. The impact is only seen when ART is OFF. We decided to remove the consumption tables, with ART OFF, from the datasheets as ART OFF configuration is not recommended.

In a firmware which doesn’t fully run from ART, the performance gain will induce a proportional increase on consumption.

Some performance measurements done on ST motor control library, using the new wait-states specification, are showing that in:

  • 3-shunt use case, fully run from internal Flash: The performance gain is 37%
  • 1-shunt use case, fully run from internal Flash : The performance gain is 39%
  • When the CCM SRAM is used to execute the critical routines, there is no significant performance gain as using the CCM SRAM is the best way to get the maximum performance.

Best regards,

Najoua.

5 REPLIES 5

Hi Najoua,

Thanks for the benchmark.

Can you compare the performance - whatever that means - between the same motor control library, run from FLASH and from CCM RAM?

Thanks,

Jan

​Hi Jan

I am not sure I understood the point. In my previous post, I put :

When the MC library is fully running from internal Flash:

  • 3-shunt use case,  the performance gain is 37%
  • 1-shunt use case,  the performance gain is 39%

When the CCM SRAM is used to execute the critical routines, and still the Flash is used for remaining code,  there is no significant performance gain (it is ~ 1%).

Please let me know if this doesn't answer the question.

Best regards,

Najoua.

You are providing old vs new comparison, but he is asking for a FLASH vs RAM comparison. To be more specific - new FLASH ART ON vs CCM SRAM.

@hamdi.najoua​ Thank you for the data - it is very helpful. In addition, can you provide a dual bank VS single bank comparison with the new setting? Please.

hamdi.najoua
Associate III

Hi Singh,

With single bank configuration (128-bit) we have up to 20% of performance gain versus the dual bank configuration (64-bit).

Regards,

Najoua.