Skip to main content
DCtech
Associate III
January 3, 2022
Solved

ARM Cortex M7

  • January 3, 2022
  • 7 replies
  • 4307 views

I was using stm32f4 on my project but now I want to use the h7 products. I am reading referance manual and watching some videos about the arm cortex m7, but I didnt understand completely about the CPU things. How can I learn the most basic way to understand its memory organization ?

This is one of the things i don't understand:

I also exemine the example of the stm32Cube with h7, every examples start with CPU_CACHE_Enable(); , Should I use the this line in every project and why I didnt understand this function using although reading referance manual ?

This topic has been closed for replies.
Best answer by mƎALLEm

Dear @DCtech​ 

I invite you to read:

  • The AN4891 "STM32H72x, STM32H73x, and single-core STM32H74x/75x system architecture and performance" may
  • AN4667 "STM32F7 Series system architecture and performance"
  • AN4839 "Level 1 cache on STM32F7 Series and STM32H7 Series"
  • AN4838 "Managing memory protection unit in STM32 MCUs"

For your question about cache enable: the cache is used to increase the performance of the CPU and it depends on your code and data location. For example if ITCM memory is used for code execution, no need to activate the I-Cache (Instruction Cache). If your data are located in DTCM, no need to activate D-Cache (Data Cache).

So, I suggest to refer to Application notes listed above to understand and have an architecture overview around Cortex-M7.

7 replies

Tesla DeLorean
Guru
January 3, 2022

Unlike the CM4 the CM7 has a real cache architected into the core design, and it, like the FPU, is off by default and needs to be enabled. The STM32F4 has ST's ART cache but this only serves to hide the slowness of the FLASH memory.

The RM should have a bus diagram showing the topology of the different RAM memories, and their transactional distance from the core, and the peripherals and DMA units the are most closely coupled too.

The H7 design is more complex as it was always supposed to be a dual core device. So for example the main FLASH and SRAM where dual ported. if two concurrent accesses one from each side/port.​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
waclawek.jan
Super User
January 3, 2022

Reference manual is not dealing with the processor-specific issues; for that, read PM0253 (and for further details, ARM's Cortex-M7 and ARMv7M manuals).

Also, read AN4839.

You may want to read also AN4667 - while it deals with 'F7 rather than 'H7, it may give you an interesting insight to the Cortex-M7 memory-bus-related issues, especially in conjunction with the 'F7-to-'H7 migration appnote, AN4936.

JW

DCtech
DCtechAuthor
Associate III
January 3, 2022

Thank you for your advice and sources.

I've a little question to understand something.

My source code for f4, this source code enough for f4. If I use the this code on h7, do I have to use this function: CPU_CACHE_Enable() ? Do I need using Caches ?

TDK
Super User
January 3, 2022

Cache is an optional feature and does not need to be enabled. Enabling cache will improve performance at the expense of possibly increasing code complexity.

"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
Super User
January 6, 2022

Hi Peter,

On https://www.st.com/en/microcontrollers-microprocessors/stm32h743ag.html#documentation I see Application Notes (5 of 52) and under the 5 appnotes I see Load More. When I click on Load More once, I see all 52 appnotes and no Load More. Within those 52 appnotes, there is no AN4891 (below is the list).

Jan

@Peter BENSCH​ 

AN3126 Audio and waveform generation using the DAC in STM32 products

   4.0   08 Jul 2020

AN5020 Digital camera interface (DCMI) on STM32 MCUs

   1.0   04 Aug 2017

AN1709 EMC design guide for STM8, STM32 and Legacy MCUs

   3.1   09 May 2019

AN1181 Electrostatic discharge sensitivity measurement

   1.6   11 Jul 2017

AN5543 Enhanced methods to handle SPI communication on STM32 devices

   2.0   05 Jul 2021

AN5342 Error correction code (ECC) management for internal memories protection on STM32H7 Series

   2.0   09 Jan 2020

AN4566 Extending the DAC performance of STM32 microcontrollers

   3.0   19 Sep 2019

AN5348 FDCAN peripheral on STM32 devices

   1.0   07 Oct 2019

AN5405 FDCAN protocol used in the STM32 bootloader

   2.0   28 Jun 2021

AN4776 General-purpose timer cookbook for STM32 microcontrollers

   3.0   16 Jul 2019

AN5200 Getting started with STM32H7 Series SDMMC host controller

   1.0   30 Nov 2018

AN4938 Getting started with STM32H74xI/G and STM32H75xI/G hardware development

   5.0   21 Jan 2020

AN4990 Getting started with sigma-delta digital interface on applicable STM32 microcontrollers

   1.0   05 Apr 2018

AN5354 Getting started with the STM32H7 Series MCU 16-bit ADC

   1.0   23 Mar 2020

AN4539 HRTIM cookbook

   4.0   23 Apr 2021

AN4750 Handling of soft errors in STM32 applications

   2.1   11 Jul 2017

AN4996 Hardware JPEG codec peripheral in STM32F76/77xxx and STM32H743/53/45/55/47/57/50/A3/B3/B0xx microcontrollers

   3.0   24 Dec 2019

AN4803 High-speed SI simulations using IBIS and board-level simulations using HyperLynx® SI on STM32 MCUs and MPUs

   2.0   06 Sep 2019

AN2834 How to get the best ADC accuracy in STM32 microcontrollers

   7.0   01 Jun 2021

AN4229 How to implement a vocoder solution using STM32 microcontrollers

   1.2   20 Apr 2020

AN4221 I2C protocol used in the STM32 bootloader

   10.0   11 Jun 2021

AN5027 Interfacing PDM digital microphones using STM32 MCUs and MPUs

   2.0   17 Jul 2019

AN5156 Introduction to STM32 microcontrollers security

   6.0   06 Jul 2021

AN4861 LCD-TFT display controller (LTDC) on STM32 MCUs

   3.0   15 Jul 2020

AN4839 Level 1 cache on STM32F7 Series and STM32H7 Series

   2.0   07 Mar 2018

AN4838 Managing memory protection unit in STM32 MCUs

   5.0   20 Sep 2021

AN5312 Migration from RevY to RevV for STM32H743/753 and STM32H750 Value line microcontrollers

   1.0   05 Apr 2019

AN5293 Migration guide from STM32F7 Series and STM32H743/753 line, to STM32H7A3/7B3 and STM32H7B0 Value line devices

   5.0   12 Oct 2020

AN4936 Migration of microcontroller applications from STM32F7 Series to STM32H743/753 line

   2.0   15 Sep 2020

AN4635 Minimization of power consumption using LPUART for STM32 microcontrollers

   5.0   28 Nov 2019

AN2867 Oscillator design guide for STM8AF/AL/S, STM32 MCUs and MPUs

   15.0   07 Oct 2021

AN4760 Quad-SPI interface on STM32 microcontrollers and microprocessors

   4.0   13 Dec 2021

AN5073 Receiving S/PDIF audio stream with the STM32F4/F7/H7 Series

   2.0   28 Jun 2018

AN4286 SPI protocol used in the STM32 bootloader

   10.0   11 Jun 2021

AN5224 STM32 DMAMUX: the DMA request router

   4.0   09 Jun 2020

AN4908 STM32 USART automatic baud rate detection

   2.0   15 Oct 2020

AN4013 STM32 cross-series timer overview

   9.0   01 Jun 2021

AN4899 STM32 microcontroller GPIO configuration for hardware settings and low-power consumption

   2.0   12 Aug 2021

AN4989 STM32 microcontroller debug toolbox

   3.0   28 Jan 2021

AN4230 STM32 microcontroller random number generation validation using the NIST statistical test suite

   6.0   18 Aug 2020

AN2606 STM32 microcontroller system memory boot mode

   51.0   26 Oct 2021

AN5033 STM32Cube MCU Package examples for STM32H7 Series

   7.0   30 Jun 2020

AN5337 STM32H7 Series lifetime estimates

   2.0   21 Jul 2020

AN2639 Soldering recommendations and package information for Lead-free ECOPACK MCUs and MPUs

   7.0   11 Oct 2019

AN5036 Thermal management guidelines for STM32 applications

   3.0   23 Apr 2019

AN3155 USART protocol used in the STM32 bootloader

   14.1   11 Jun 2021

AN3156 USB DFU protocol used in the STM32 bootloader

   12.1   08 Jun 2021

AN5225 USB Type-C Power Delivery using STM32 MCUs and MPUs

   5.0   13 Oct 2021

AN4879 USB hardware and PCB guidelines using STM32 MCUs

   4.0   19 Dec 2018

AN4759 Using the hardware real-time clock (RTC) and the tamper management unit (TAMP) with STM32 microcontrollers

   7.0   21 Sep 2021

AN5690 VREFBUF peripheral applications and trimming technique

   2.0   09 Dec 2021

AN4655 Virtually increasing the number of serial communication peripherals in STM32 applications

   1.1   11 Jul 2017

Peter BENSCH
Technical Moderator
January 6, 2022

Thanks, Jan,

Now it gets really mysterious, because I had definitely seen the AN4891 with my own eyes in this list yesterday - most strange.

Funnily enough, it shows up in the tab Tools & Software, under

MCU & MPU Embedded Software > X-CUBE-PERF-H7.

In X-CUBE-PERF-H7 it is then finally also to be found. Perhaps a little unfortunate positioned.

Regards

/Peter

@Community member​ 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
TDK
Super User
January 6, 2022

It's under "Application Notes for related Tools & Software (30 of 30)".

However, depending on what buttons you click and how the website feels at the current moment, it may or may not be available with a "Load more" button.

0693W00000HqmfOQAR.png 

0693W00000HqmfsQAB.png

"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
Super User
January 6, 2022

> It's under "Application Notes for related Tools & Software (30 of 30)".

Indeed. What an inappropriate place.

> depending on what buttons you click

The whole design of those product folders is a fail. "Modern and trendy", but not functional. ST won't listen to us anyway, I gave up.

JW

TDK
Super User
January 6, 2022
I hate the site design as well. It takes 2-3 seconds to load, tabs disappear while you are viewing it, things actively move in unexpected ways at certain points while you scroll down the page, the header remains onscreen and takes up viewing space when you don't want it to be there.
The only way such a design would be deemed adequate is if the person making the decision never actually needs to use the site. Unfortunately, I suspect most software decisions in large companies are made by such a person.
The saving grace of ST is that its hardware is really quite good and, up until a couple years ago, relatively cheap and readily available.
"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
Super User
January 6, 2022

Peter,

> Perhaps a little unfortunate positioned.

That's not "little". It completely defeats the point of the AN. If it's hidden at an unexpected place, it's as good as it never existed.

Jan

@Peter BENSCH​ 

Peter BENSCH
Technical Moderator
January 6, 2022

Jan,

I agree with you guys completely.

However, with this discussion we have left the original question or the topic of the TO again, haven't we?

/Peter

@Community member​ 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.