Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Run code from ram memory

Hallo.
this is the first time i face the ST platform.
In other mcu i’ve worked in the past, there were possibe to move some parts of time critical code to ram, and run them from there to get the best performance, since the flash mamory access were slower then the ram access.
How can I get this behaviour in ST Mcu?
Thank you in advance.
Paolo

OS: Windows 7
System Workbench for STM32 version: 2.0.1
MCU: STM32L051C8T3

In STM32 you rarely need to run code from RAM because the pros are very limited and there are cons. In more than 10 projects I used running code from core-coupled (CCM) RAM ( http://www.openstm32.org/Using+CCM+Memory?structure=DocumentationQuestion ) just once.

ARM Cortex-M uses the Harvard architecture with separate code and data buses, when you are running code from RAM you are losing the speed advantage of this architecture as now you have both your code and data in the RAM.

The core provides other means to workaround the slow flash access time: You should carefully read all the available documentation (programmer’s manual, datasheet, reference manual) then configure the bits for pre-fetch, pre-read, wait-time, buffers, caches, etc. according your core frequency and voltage scale to have maximum possible performance or energy efficiency (or something between).


This is the first time for me on this architecture.
Thank you for your advices, now it is more clear...
I’ll go through the documentation to get maximum performance running code from flash memory.


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs