Skip to main content
Joerg Wagner
Senior III
October 25, 2017
Question

CubeMX 4.23.0 bugs NUCLEO-H743ZI

  • October 25, 2017
  • 4 replies
  • 1143 views
Posted on October 25, 2017 at 18:27

Hi guys.

1.)

I already mentioned a bug in the previous CubeMX release.

Enabling Ethernet CubeMX reserves

PB12 for ETH_TXD0

and

PB11 for ETH_TX_EN

and writes the wrong settings in ethernetif.c

But it must be:

PG13 for ETH_TXD0

and

PG11 for ETH_TX_EN

2.)

The speed setting should be at least HIGH or VERY_HIGH but it is set to:

GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW

3.)

A new project with the button checked 'Initialize all peripherals with their default Mode'

will not find a solution if setting the clock to 400 MHz. Setting the dividers by hand works.

Solution: Uncheck USB_OTG_FS, because the clock solution process does not find a goal for 48 MHz.

4.)

Sometimes I had the situation: I disabled 'USB_OTG_FS' but it was still green and listed under Configuration.

- Joerg -

    This topic has been closed for replies.

    4 replies

    Amel NASRI
    Technical Moderator
    October 26, 2017
    Posted on October 26, 2017 at 10:50

    Hi

    Wagner.Joerg

    ‌,

    The ethernet related issue is already reported to our CubeMX team, but unfortunately a little bit late to be plannedin the release 4.

    I will highlight it again besides to the issues youadded in this post.

    -Amel

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    Jeanne Joly
    Associate
    February 15, 2018
    Posted on February 15, 2018 at 17:50

    Hi,

    Regarding the 2 first points, CubeMX is a tool used to configure a SOC (only the SOC, not associated with a dedicated HW).

    Whereas the ioc of boards (as STM32F767 Nucleo) is configured as expected as there is an associated HW and we synchronize the pin/signal with the HW.

    Close to the PG13 pin at the Morpho connector is the resistor SB182 and he is physically connected to the PG13 at the die, like in the current schematics V1.1. So, i

    f you took the nucleo boards STM32F767 with the associated ioc (with IP already initialised), you will have the signal ETH_TXD0 on PG13, on PG11 ETH_TX_EN. 

    Whereas, when CubeMX configures the SOC, it can't know which pin to prioritize as there is no HW... by default, it is the PB12 for ETH_TXDO which is correct.

    BR. Jeanne

    Jeanne Joly
    Associate
    February 15, 2018
    Posted on February 15, 2018 at 17:52

    Regarding the 2 last points, for the last one, I can't reproduce the issue you highlighted.

    And for the third point, could you please be more precise? (send me an ioc?).

    BR. Jeanne

    Joerg Wagner
    Senior III
    February 15, 2018
    Posted on February 15, 2018 at 22:17

    Hi.

    To reproduce #3 simpy follow this steps:

    - Open CubeMX 4.24 (or 4.23)

    - New Project

    - Choose Board, select Nucleo-H743ZI

    - Click on ''Start Project''

    - Choose

    0690X00000609lVQAQ.png

    - Then click the ''Clock Configuration'' tab and enter 400 MHz

    0690X00000609gUQAQ.png

    It hangs in an endless loop, no solution will be find.

    #4 was very hard to produce and did not appear in 4.24 anymore.

    #1: I disagree because it's fixed in CubeMX 4.24, see below in the code lines

    #2: Unfortunately still set to FREQ_LOW, see below in the code lines

    Quote from Oussema:

    HAJJEM.Oussema

    @

    https://community.st.com/thread/44202-nucleo-h743zi-stm32h743zi-no-ethernet-dma-transfer#comment-171132

    on

    https://community.st.com/thread/44202-nucleo-h743zi-stm32h743zi-no-ethernet-dma-transfer#comment-171245

    Hello Joerg,

    I reviewed your code, and I found that you are not enabling the ETH MAC and DMA transmission and reception.

    So could you please add the call to HAL_ETH_Start(&heth); after the ETH initialization.

    Also I see that the ETH GPIO speed configuration is setGPIO_SPEED_FREQ_LOW so could you please replace it byGPIO_SPEED_FREQ_HIGH, because in RMII mode the IO communication frequency is 50 MHz

    When I did the test I can see that the OWN bit is set to 0 after frame each frame transmission

    BR,

    Oussema.

    __________________________________________________________________

    This is the current code from CubeMX 4.24

    /**ETH GPIO Configuration

    PC1 ------> ETH_MDC

    PA1 ------> ETH_REF_CLK

    PA2 ------> ETH_MDIO

    PA7 ------> ETH_CRS_DV

    PC4 ------> ETH_RXD0

    PC5 ------> ETH_RXD1

    PB13 ------> ETH_TXD1

    PG11 ------> ETH_TX_EN // <--- fixed in 4.24

    PG13 ------> ETH_TXD0

    // <--- fixed in 4.24

    */

    GPIO_InitStruct.Pin = RMII_MDC_Pin|RMII_RXD0_Pin|RMII_RXD1_Pin;

    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

    GPIO_InitStruct.Alternate = GPIO_AF11_ETH;

    HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);

    GPIO_InitStruct.Pin = RMII_REF_CLK_Pin|RMII_MDIO_Pin|RMII_CRS_DV_Pin;

    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed =

    GPIO_SPEED_FREQ_LOW;

    GPIO_InitStruct.Alternate = GPIO_AF11_ETH;

    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

    GPIO_InitStruct.Pin = RMII_TXD1_Pin;

    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed =

    GPIO_SPEED_FREQ_LOW;

    GPIO_InitStruct.Alternate = GPIO_AF11_ETH;

    HAL_GPIO_Init(RMII_TXD1_GPIO_Port, &GPIO_InitStruct);

    GPIO_InitStruct.Pin = RMII_TX_EN_Pin|RMII_TXD0_Pin;

    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;

    GPIO_InitStruct.Pull = GPIO_NOPULL;

    GPIO_InitStruct.Speed =

    GPIO_SPEED_FREQ_LOW;

    GPIO_InitStruct.Alternate = GPIO_AF11_ETH;

    HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);

    Best regards, Joerg

    John Craven
    Senior
    February 15, 2018
    Posted on February 15, 2018 at 23:40

    0690X00000609gAQAQ.png

    on the clock config  in cubemx, what is the HSE input freq?

    when i make project for that NUC board, the project default is 25MHz

    But the NUCs use 8MHz MCO from stlink by default.

    This burned my twice on Nuc-767 projects.

    Joerg Wagner
    Senior III
    February 16, 2018
    Posted on February 16, 2018 at 23:26

    8, which is correct. We are talking about H743, not F767

    You can try for yourself with CubeMX.

    0690X00000609dSQAQ.png