STM32H750B-DK Mac Failure

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

bulletsquid
Posts: 3
Joined: Sat Aug 06, 2022 12:12 am

STM32H750B-DK Mac Failure

Postby bulletsquid » Sat Aug 06, 2022 12:17 am

I'm running the blinker demo for this board and it works just fine, but if I enable HAL_USE_MAC, then the board freezes.

I've traced the issue with GDB to

Code: Select all

osalSysHalt("MAC failure");
in hal_mac_lld.c and it doesn't seem like it's finding the PHY_ADDRESS?

Using the demo mcuconf.h, chconf.h and halconf.h for this and openocd to flash and program the board with

Code: Select all

openocd -f /usr/share/openocd/scripts/board/stm32h750b-disco.cfg -c "program build/ch.elf verify reset exit"


Not sure what the issue could be, I'm fairly new to embedded systems.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: STM32H750B-DK Mac Failure

Postby Giovanni » Sat Aug 06, 2022 2:25 pm

Hi,

I will not have a board available until September, I would check for errors in board files, some GPIO could be wrong and prevent PHY identification.

Giovanni

bulletsquid
Posts: 3
Joined: Sat Aug 06, 2022 12:12 am

Re: STM32H750B-DK Mac Failure

Postby bulletsquid » Fri Aug 12, 2022 3:25 am

Thanks for the reply.

I'm looking through the board.h file but I'm not really sure what I'm looking at...

I went through the hardware layout sheet provided by ST for the board but I'm also not sure how to associate the CN1 Ethernet pins to the GPIO definitions.

Image

This is what I'm looking at for pin assignments and they seem to be matching whats on the board.h configuration, so besides I'm not sure what I could be missing.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: STM32H750B-DK Mac Failure

Postby Giovanni » Fri Aug 12, 2022 5:42 pm

Hi,

Until I get back from vacation I cannot test this, I would also check clocks and verify if RMII requires some specific clock setting.

Giovanni

bulletsquid
Posts: 3
Joined: Sat Aug 06, 2022 12:12 am

Re: STM32H750B-DK Mac Failure

Postby bulletsquid » Wed Aug 17, 2022 8:25 pm

I looked for anything in regards to the clocks and couldn't see anything off from the manual.

However, I found this piece of information from https://community.st.com/s/article/How- ... ck-working:

Modify the linkerscript (*.ld) that the ETH descriptors and buffers are located in D2 SRAM. Also it is recommended to place all RAM to RAM_D1.
In STM32CubeMX generated project, the "_FLASH" suffix linkerscript should be modified, which is used by default (e.g.: STM32H750XBHx_FLASH.ld). The "_RAM" suffix linkerscript is template for executing code from internal RAM memory.

Code: Select all

 } >RAM_D1

  /* Modification start */
  .lwip_sec (NOLOAD) : {
    . = ABSOLUTE(0x30040000);
    *(.RxDecripSection)
   
    . = ABSOLUTE(0x30040060);
    *(.TxDecripSection)
   
    . = ABSOLUTE(0x30040200);
    *(.RxArraySection)
  } >RAM_D2
  /* Modification end */

  /* Remove information from the compiler libraries */
  /DISCARD/ :
  {
    libc.a ( * )
    libm.a ( * )
    libgcc.a ( * )
  }


The memory definitions at the beginning of the linkerscript should look like:

Code: Select all

MEMORY
{
    FLASH (rx)      : ORIGIN = 0x08000000, LENGTH = 1024K
    DTCMRAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 128K
    RAM_D1 (xrw)      : ORIGIN = 0x24000000, LENGTH = 512K
    RAM_D2 (xrw)      : ORIGIN = 0x30000000, LENGTH = 288K
    RAM_D3 (xrw)      : ORIGIN = 0x38000000, LENGTH = 64K
    ITCMRAM (xrw)      : ORIGIN = 0x00000000, LENGTH = 64K
}



Looking at the .ld script for stm32h750 in chibios, I only see the following:

Code: Select all

SECTIONS
{
    /* Special section for non cache-able areas.*/
    .nocache (NOLOAD) : ALIGN(4)
    {
        __nocache_base__ = .;
        *(.nocache)
        *(.nocache.*)
        *(.bss.__nocache_*)
        . = ALIGN(4);
        __nocache_end__ = .;
    } > NOCACHE_RAM

    /* Special section for Ethernet DMA non cache-able areas.*/
    .eth (NOLOAD) : ALIGN(4)
    {
        __eth_base__ = .;
        *(.eth)
        *(.eth.*)
        *(.bss.__eth_*)
        . = ALIGN(4);
        __eth_end__ = .;

    } > ETH_RAM
}


The link provided above specifies that it should be set to SRAM2, but here its doing ETH memory stuff on SRAM3. Does this seem correct on ChibiOS side?

Again, thank you for your patience and guidance.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: STM32H750B-DK Mac Failure

Postby Giovanni » Wed Aug 17, 2022 8:57 pm

It is you that decide where ETR_RAM is, not sure what your question is.

This is unrelated to the previous problem.

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 22 guests