cancel
Showing results for 
Search instead for 
Did you mean: 

HardFault when trying to access more than 128K DTCM on STM32N6 Nucleo Board.

IO1
Visitor

Hello,

I am trying to extend DTCM to 256K. I followed FLEXMEM Configurations example but I get HardFault as soon as I try to access DTCM in 0x30020000 - 0x30040000 address range. 

Could someone please provide working example of how to extend DTCM to 256K?

2 REPLIES 2

"The FLEXMEM configuration depends upon CFGDTCMSZ[3:0] and CFGITCMSZ[3:0] in SYSCFG_CM55TCMCR. It configuration cannot be changed at runtime, a reboot is needed."

https://developer.arm.com/documentation/101051/0101/Signal-descriptions/Static-configuration-signals

https://github.com/STMicroelectronics/STM32CubeN6/blob/main/Projects/NUCLEO-N657X0-Q/Examples/SYSCFG/FLEXMEM_Configurations/README.md?plain=1

https://github.com/STMicroelectronics/STM32CubeN6/blob/main/Projects/NUCLEO-N657X0-Q/Examples/SYSCFG/FLEXMEM_Configurations/FSBL/Src/main.c#L100

The POWER-ON reset might be a challenge from the debugger.

Would suggest doing without it, perhaps instrument HardFault Handler via the USART, and have success/failure indicated by LEDs, so you can observe if it faults, or that it completed the access tests.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
RomainR.
ST Employee

Hello @IO1 

This discussion should help you. See the link below. 

https://community.st.com/t5/stm32-mcus-products/stm32n6-hard-fault-when-accessing-tcm/td-p/757557

Best regards,

Romain

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.