cancel
Showing results for 
Search instead for 
Did you mean: 

problem when changing from DTCM Ram to RAM_D1

VYoun
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
RMcCa
Senior II

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.

View solution in original post

12 REPLIES 12

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
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

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
Associate III

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

Thank you very much

Thanks a lot Clive, I will sure check.

Change

_estack = 0x20020000;

to

_estack = 0x30000000;

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

thank you very much.

I did it but then everything stopped working. :(

VYoun
Associate III
 
RMcCa
Senior II

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.

Sorry, meant 0x30020000, which is the end of SRAM1.
If you feel a post has answered your question, please click "Accept as Solution".