Skip to main content
Joerg Wagner
Senior III
January 21, 2018
Solved

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

  • January 21, 2018
  • 2 replies
  • 1036 views
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.

    This topic has been closed for replies.
    Best answer by Joerg Wagner
    Posted on February 07, 2018 at 23:42

    Solved with HAL 1.2.0

    2 replies

    Tesla DeLorean
    Guru
    January 21, 2018
    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 VenmoUp vote any posts that you find helpful, it shows what's working..
    Joerg Wagner
    Senior III
    January 21, 2018
    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
    Joerg WagnerAuthorBest answer
    Senior III
    February 7, 2018
    Posted on February 07, 2018 at 23:42

    Solved with HAL 1.2.0