cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743 placing .data or .bss in RAM_D2 = Hard Fault

Joerg Wagner
Senior III
Posted on January 21, 2018 at 01:31

Which step is neccessary to have .data and .bss sections in RAM_D2?

If I place them in domain D2, HardFault_Handler() is called. Why?

There are known bugs in hal_spi.c - Ethernet works sometimes (if you correct the Pin settings and place decriptors anywhere except in DTCM), but sometimes a RTE occurs or nothing is sent - CubeMX does not check APBx speeds and set the default to 200MHz instead of 100, hal_eth contains a hardcoded 536 DMA segment size.

1 ACCEPTED SOLUTION

Accepted Solutions
Joerg Wagner
Senior III
Posted on February 07, 2018 at 23:42

Solved with HAL 1.2.0

View solution in original post

3 REPLIES 3
Posted on January 21, 2018 at 02:16

Do you call SystemInit() prior to copying/clearing the memory?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on January 21, 2018 at 08:43

Yes. App is created with SW4STM32.

Using DTCM for .bss and .data, variables in D2 not used for peripherals are available.

In startup_stm32h743xx.s

/* Call static constructors */

    bl __libc_init_array

hangs after SystemInit.

I tried to add

  /* Change  the switch matrix read issuing capability to 1 for the AXI SRAM target (Target 2) */

  *((__IO uint32_t*)0x51003108) = 0x000000001;

in SystemInit()

Joerg Wagner
Senior III
Posted on February 07, 2018 at 23:42

Solved with HAL 1.2.0