Skip to main content
VYoun
Associate III
July 20, 2020
Solved

problem when changing from DTCM Ram to RAM_D1

  • July 20, 2020
  • 12 replies
  • 3982 views

Hello,

I am writing a project with STM32H7. The project contains RTC, SPI, USART, SD Card, timers, and I2C.

In order to have more RAM, I have brough the data and bss to RAM_D1.

As next steps I want to implement Ethernet. However, I realized that in order for Ethernet to work, I need to only use RAM_D1.

The problem is when I bring the heap and stack to RAM_D1, the project stops working.

Can someone please help?

I include the linker script before and after bringing everything to RAM_D1.

Thank you in advance for your help.

This topic has been closed for replies.
Best answer by RMcCa

Single or dual core? If i needed extra ram for the m7 core i would use the axiram, not d2 sram​. As you have found out, the peripherals might need the d2 sram.

12 replies

Tesla DeLorean
Guru
July 20, 2020

Instrument code so you can identify where it stops working. Have Hard Fault and Error Handlers output actionable data.

Some memories require clocks to be enabled​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
VYoun
VYounAuthor
Associate III
July 20, 2020

Thanks a lot Clive, I will sure check.

TDK
July 20, 2020

You need to update _estack to point to the end of the stack. It's still pointing at DTCM space. Pretty sure some malloc implementations don't like when the stack is below the heap.

"If you feel a post has answered your question, please click ""Accept as Solution""."
VYoun
VYounAuthor
Associate III
July 20, 2020

I am sorry but can you tell me what to exactly do? I am really new in this field.

Thank you very much

TDK
July 20, 2020

Change

_estack = 0x20020000;

to

_estack = 0x30000000;

"If you feel a post has answered your question, please click ""Accept as Solution""."
RMcCa
RMcCaBest answer
Senior II
July 20, 2020

Single or dual core? If i needed extra ram for the m7 core i would use the axiram, not d2 sram​. As you have found out, the peripherals might need the d2 sram.

VYoun
VYounAuthor
Associate III
July 20, 2020

I am using the single core (STM32H753). Right now I have put the .bss and the .data on the RAM_D1 and the heap and stack on DTCMRAM and it is working fine. However, for implementing Ethernet I need to bring also the heap and stack (as i have read and so far understood) to RAM_D1, and when I do so peripherals stop working (SPI and USART as far as it is visible to me).