cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a project on STM32H745Zi-q with Ethernet ,lwip with RTO's?

Sbera.1
Associate II

Can you please help me anyone to solve the below warning as well as note in Ethernet configuration .....

-->WARning ;-The ETH can work only when RAM is pointing at 0x24000000

-->NOTE:-PHY Driver must be configured from the LwIP 'Platform Settings' top right tab

i'm working on STM32745zi-q with ethernet and lwip with RTO's for UDP...... here i'm follwing the below ST links

"https://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working"

at the same time going through FAQ link to

"https://community.st.com/s/article/FAQ-Ethernet-not-working-on-STM32H7x3"

please can I get the solution to set the RAM address to 0x24000000,as well as to how to set IP address,Net-mask address of the board.

Here the next step where i'm struck in debugging of code too is as follows...... in lan8742.c file ,getting as return value as LAN8742_STATUS_ERROR macro.

int32_t LAN8742_RegisterBusIO(lan8742_Object_t *pObj, lan8742_IOCtx_t *ioctx)

{

 if(!pObj || !ioctx->ReadReg || !ioctx->WriteReg || !ioctx->GetTick)

 {

  return LAN8742_STATUS_ERROR;

 }

  

 pObj->IO.Init = ioctx->Init;

 pObj->IO.DeInit = ioctx->DeInit;

 pObj->IO.ReadReg = ioctx->ReadReg;

 pObj->IO.WriteReg = ioctx->WriteReg;

 pObj->IO.GetTick = ioctx->GetTick;

  

 return LAN8742_STATUS_OK;

}

please can i find any solution for this

4 REPLIES 4
alister
Lead

>Can you please help

  1. RM0433 rev 7 chapter 58 and elsewhere
  2. AN4891 rev 3 chapter 5 and everywhere
  3. Google "STM32H7 ethernet" without the quotes.

Some helpful Google hits include

  1. https://www.st.com/content/ccc/resource/training/technical/product_training/group0/00/2e/df/ff/be/ad/4e/79/STM32H7-Peripheral-Ethernet_ETH/files/STM32H7-Peripheral-Ethernet_ETH.pdf/_jcr_content/translations/en.STM32H7-Peripheral-Ethernet_ETH.pdf
  2. https://stackoverflow.com/questions/55260931/stm32h7-lan8742-lwip-only-works-fine-after-power-up-not-after-reset. Not sure if this is helpful or not. But problems are rarely unique and often someone's asked before.

>Here the next step where i'm struck in debugging of code too is as follows...... in lan8742.c

From you rcode snippet, it looks almost certain you'v enot initialised pObj properly.

If you load the code in a debugger and step and/or inspect, you'll find a mistake or be able to provide specific details here.

>please can i find any solution for this

I was going to suggest search community. But search only throws one or two. Here are some pages I know of:

  1. https://community.st.com/s/question/0D50X0000BOtfhnSQB/how-to-make-ethernet-and-lwip-working-on-stm32
  2. https://community.st.com/s/question/0D50X0000C6eNNSSQ2/bug-fixes-stm32h7-ethernet (me).

Sbera.1
Associate II

0693W000001qIzyQAE.pngHello Alister,

Here i got 3 issues,they are as follows.....

1.Ethernet configuration in .ioc file

warning:-com.l2fprod.common.propertysheet.PropertySheetTableModel$Item@7bd47880

The ETH can work only when RAM is pointing at 0x24000000

Note:-com.l2fprod.common.propertysheet.PropertySheetTableModel$Item@6373affb

PHY Driver must be configured from the LwIP 'Platform Settings' top right tab

FYI modified the RAM address in linker file also ..........

2. PWR setting warning in .ioc file

I'm not having any clear idea on PWR configurations,if i did any chances its effecting Ethernet configurations too....

  

3.When I'm going with the step by step debugging i struck in the lan8742.c file which is from  HAL_Init() .......the below mention code is from where I struck,here i have to get return status as LAN8742_STATUS_OK but one of the condition in "if " is satisfying and return status as  LAN8742_STATUS_ERROR.

Above I attached the errors screen shots and my work file too....

Please can you give some suggestion about these to clear my issues.I followed your suggested links too which are related to STM743zi board.But they are not work out.

>1.Ethernet configuration in .ioc file

It's not saying you're config is necessarily wrong. Just saying what you need to do.

>2. PWR setting warning in .ioc file

Again, it's not saying you're config is necessarily wrong.

>one of the condition in "if " is satisfying and return status as  LAN8742_STATUS_ERROR.

Whatever that condition is, that's what you need to fix.

Read the source code to figure out what the functions registered by LAN8742_RegisterBusIO are used for and how they work and change the call of LAN8742_RegisterBusIO to meet its requirements.

Maybe someone on Community using LAN8742 and Cube and reading this can help.

Sbera.1
Associate II

Ok thank you ,i will follow your solution......