cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet don't work with VOS1or2 settings of STM32H745IIK6 (customer board).

ef_makino
Associate II

Hi community,

I have a problem where Ethernet does not work when VOS is set from scale3 to scale2 or scale1 on a customer board.
Please help us solve the problem.

 

Clock and peripheral settings use code generated with CubeMX v6.9.1. The CPU is STM32H745IIK6.
The Ethernet driver used is one that has been confirmed to work by our company.

 

For VOS scale3, the Ethernet driver works normally. (attachment file: "EthernetOK(scale3).ioc")

 

For VOS scale1 or scale2, the Ethernet driver operates as follows. (attachment file: "EthernetNG(scale1).ioc")
- Packets are being received fewer than usual and appear to be dropping.
- When the packet sending function is called, the process completes normally, but the packet is not visible on Wireshark from the remote side.

 

I previously encountered a problem similar to when the clock supplied to the Ethernet PHY was not appropriate.
Is it possible that the ETH_RMII_REF_CLK (50MHz) clock becomes incorrect depending on the VOS settings?
I would like some advice as to why this problem occurs.

 


The customer board must be operated with a cpu main clock of 400MHz.
To operate with 400MHz, VOS1(scale1) should be specified from the datasheet.
But currently only scale3 can run the Ether driver features.

 

Kind Regards

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

According to this wiki the ETH IOs are set to Very High:

SofLit_0-1713180751504.png

According to this example for STM32H743I-EVAL board provided in STM32CubeH7, the ETH GPIOs are set to High speed. Config located in ethernetif.c file:

 

/**
  * @brief  Initializes the ETH MSP.
  *   heth: ETH handle
  * @retval None
  */
void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
{
  GPIO_InitTypeDef GPIO_InitStructure = {0};
  /* Ethernett MSP init: RMII Mode

  RX_CLK  --------------> PA1
  TXD0    --------------> PB12
  TXD1    --------------> PB13
  RXD0    --------------> PC4
  RXD1    --------------> PC5
  TX_EN   --------------> PB11
  RX_DV   --------------> PA7

  MDC     --------------> PC1
  MDIO    --------------> PA2

  */

  /* Enable GPIOs clocks */
  __HAL_RCC_GPIOA_CLK_ENABLE();
  __HAL_RCC_GPIOC_CLK_ENABLE();
  __HAL_RCC_GPIOG_CLK_ENABLE();

  /* Configure PA1, PA2 , PA7 */
  GPIO_InitStructure.Pin =  GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7;
  GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_HIGH;
  GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
  GPIO_InitStructure.Pull = GPIO_NOPULL ;
  GPIO_InitStructure.Alternate = GPIO_AF11_ETH;
  HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);

  /* Configure PG11, PG12 and PG13 */
  GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13;
  HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);

  /* Configure PC1, PC4 and PC5 */
  GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
  HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);

  /* Enable Ethernet clocks */
  __HAL_RCC_ETH1MAC_CLK_ENABLE();
  __HAL_RCC_ETH1TX_CLK_ENABLE();
  __HAL_RCC_ETH1RX_CLK_ENABLE();
}

 

 So you need at least to set it to High speed but I recommend to set it to Very High speed.

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.

View solution in original post

9 REPLIES 9
SofLit
ST Employee

Hello,

Your system is set to 200MHz and not 400MHz. The two projects are set to 200MHz one set to Flash WS=1 and the other WS=2

Did you check that table in RM: Flash WS vs System frequency/VOS level?:

SofLit_0-1712832670505.png

Also check/monitor your VCORE voltage level according to the datasheet:SofLit_1-1712832910257.png

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.
ef_makino
Associate II

Hi,

Thank you for your reply. 🙂

 

> Your system is set to 200MHz and not 400MHz.
Sorry, It was my lack of explanation. The two attached ioc files are both set to 200MHz.
It seemed like the VOS setting was the only condition that changed Ethernet communication from OK to NG.
That's why I have attached a project with the same clock settings but different VOS settings.

Also, Ethernet doesn't work even for 400MHz projects. (EthernetNG(scale1)_400MHz.ioc)

 

> The two projects are set to 200MHz one set to Flash WS=1 and the other WS=2.
> Did you check that table in RM: Flash WS vs System frequency/VOS level?:

I used the values automatically set by CubeMX for Flash WS settings, but is this incorrect?
Isn't "AXI Interface clock" in Table.16 the same as "AXI Peripheral Clocks" on CubeMX?
In that case, the clock is 100MHz and the Flash WS value looks normal.

ef_makino_0-1712840514286.pngef_makino_1-1712840535698.png

 

> Also check/monitor your VCORE voltage level according to the datasheet:
When VOS1 is selected, it supports up to 400MHz operation, so I understand that 200MHz operation is possible, but is this correct?
I would like to know the reason why Ethernet communication does not work on a custom board when VOS1 is selected.
Can you think of any reasons why this is occurring?

And, Is it possible that the custom board hardware is the cause?

 

Please continue the support.

used the values automatically set by CubeMX for Flash WS settings, but is this incorrect?

-> It should follow the AXI frequency not the system frequency. My bad...

When VOS1 is selected, it supports up to 400MHz operation, so I understand that 200MHz operation is possible, but is this correct?

-> Yes but you need to monitor VORE voltage on VCAP pins as it could be somthing related to the HW. The VCORE should be and constantly in the range stated in the DS according to the voltage level set. Is there a voltage drop/a glitch on VCAP pins?

SofLit_1-1712832910257.png

I would like to know the reason why Ethernet communication does not work on a custom board when VOS1 is selected.
Can you think of any reasons why this is occurring?

-> Hard to tell for the moment.

And, Is it possible that the custom board hardware is the cause?

-> Yes it could be. That's why I request you to monitor VCORE voltage level. It could be an issue linked to the power supply (not sufficient current) or missing capacitors on VCAP/VDD pins.. etc ..

+

I also take this opportunity to highlight this errata in case you're using ETH in MII mode:

SofLit_0-1712842362575.png

 

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.
ef_makino
Associate II

Hi,

Thank you for your reply. 🙂

 

-> Yes it could be. That's why I request you to monitor VCORE voltage level. It could be an issue linked to the power supply (not sufficient current) or missing capacitors on VCAP/VDD pins.. etc ..

The information is helpful.

I asked the person in charge of board development to investigate the hardware.

I will contact you when the investigation results are available.

 

I also take this opportunity to highlight this errata in case you're using ETH in MII mode:

Thank you for more information. The customer board was RMII mode, so I don't think this is applicable.

 

Kind Regards

ef_makino
Associate II

Hi,
I had the customer's board's VCAP voltage checked.

The voltage was within the datasheet specifications:

1. EthernetOK(scale3).ioc ... 200MHz, VOS scale3
=> VCAP 1.014V

2. EthernetNG(scale1).ioc ... 200MHz, VOS scale1
=> VCAP 1.218V

3. EthernetNG(scale1)_400MHz.ioc ... 400MHz, VOS scale1
=> VCAP 1.222V

Also, I got the power schematic for the customer board.
Is there anything you are curious about about this schematic?

Please continue the support.

Hello,

I didn't look deeply at all your parts in your schematics but seems there are some doubts regarding the parts with red circles. In my analysis I'm based on the reference design provided by STM32H745-DISCO schematics.

SofLit_0-1712945867013.png

1- No voltage refence at VBAT pin. Just connected to a capacitor. Needs to be connected to VDD if Backup domain is not used.

From RM:

SofLit_2-1712946439215.png

2- I see two capacitors of 10u (C70/C71) mounted in parallel. In the reference design only one capacitor of 10u is used.

3- I have a doubt regarding R126 (0 ohm). Is that mounted? There is a Chinese text near to that resistor, does it mean: not mounted? 

This is the reference design from STM32H745-DISCO board.

SofLit_1-1712945965314.png

I suggest you to look deeply at STM32H745-DISCO board schematics in order to catch the differences/issues.

 

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.
ef_makino
Associate II

Hi, Thank you for your support. 🙂


> I suggest you to look deeply at STM32H745-DISCO board schematics in order to catch the differences/issues.
I asked the person in charge of board development to confirm.
The points pointed out are the intended board design and there is no problem.
Also, just to be sure, even after correcting the points pointed out, the behavior did not change.


There has been progress in the investigation.
I heard that communication was possible by changing the Ethernet GPIO pin speed from "Low" to "Very High".

I have no knowledge about GPIO pin speeds.
Do different GPIO pin speeds affect Ethernet communication?
Should the Ethernet GPIO pins be at VeryHigh speed?

Kind Regards

 

Hello,

According to this wiki the ETH IOs are set to Very High:

SofLit_0-1713180751504.png

According to this example for STM32H743I-EVAL board provided in STM32CubeH7, the ETH GPIOs are set to High speed. Config located in ethernetif.c file:

 

/**
  * @brief  Initializes the ETH MSP.
  *   heth: ETH handle
  * @retval None
  */
void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
{
  GPIO_InitTypeDef GPIO_InitStructure = {0};
  /* Ethernett MSP init: RMII Mode

  RX_CLK  --------------> PA1
  TXD0    --------------> PB12
  TXD1    --------------> PB13
  RXD0    --------------> PC4
  RXD1    --------------> PC5
  TX_EN   --------------> PB11
  RX_DV   --------------> PA7

  MDC     --------------> PC1
  MDIO    --------------> PA2

  */

  /* Enable GPIOs clocks */
  __HAL_RCC_GPIOA_CLK_ENABLE();
  __HAL_RCC_GPIOC_CLK_ENABLE();
  __HAL_RCC_GPIOG_CLK_ENABLE();

  /* Configure PA1, PA2 , PA7 */
  GPIO_InitStructure.Pin =  GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7;
  GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_HIGH;
  GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
  GPIO_InitStructure.Pull = GPIO_NOPULL ;
  GPIO_InitStructure.Alternate = GPIO_AF11_ETH;
  HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);

  /* Configure PG11, PG12 and PG13 */
  GPIO_InitStructure.Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13;
  HAL_GPIO_Init(GPIOG, &GPIO_InitStructure);

  /* Configure PC1, PC4 and PC5 */
  GPIO_InitStructure.Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
  HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);

  /* Enable Ethernet clocks */
  __HAL_RCC_ETH1MAC_CLK_ENABLE();
  __HAL_RCC_ETH1TX_CLK_ENABLE();
  __HAL_RCC_ETH1RX_CLK_ENABLE();
}

 

 So you need at least to set it to High speed but I recommend to set it to Very High speed.

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.
ef_makino
Associate II

Thanks for your support, I solved it. 🙂
Since the problem no longer occurs with VeryHigh, please close the ticket.