cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP135 - Baremetal - Ethernet2

jschneider
Associate III

Hello,

 

I would like to integrate ethernet2 in my bare-metal project. I am aware that not only eth2 pins have to be properly configured, but also a 10th pin of MCP IO expander. However, the eth2 seems to be disabled after all. I am doing the same configuration steps for eth1 and it simply works. The question is, what am I missing? Could it be PMIC?

 

Best,

J. Schneider

15 REPLIES 15

Hello @ravo ,

 

I hope you are doing well.

 

5. Adjust the clock configuration for eth2. It should use 50 MHz and probably be configured with HSE.

I don't know how to do this

> If you can't guarantee eth2 source clock being set to 50 MHz, it just won't work. ST Support will tell you no different. In CubeIDE, there is a whole section to adjust the clock configuration. You could just try to configure 50 MHz on eth2 and understand what is actually being changed. 

 

Best

J. Schneider

ravo
Senior

Dear @jschneider 

I just forgot to initiate IRQ pin, and one clock pin.

Very thanks, I also consulted with ST guy and he prefer to 

SYSCFG->PMCSETR |= (1<<25); at end of MX_ETH_Init function. But it did not work.

So I put to place as you suggest and it started working

So Very thanks for your comments.

No I would like to use both eth1 and eth2. And has some problems with initialize driver. (driver library would preffer only single eth). Maybe I need to copy whole  nx_stm32_eth_driver.c to new one... I don't find any examples yet, and in documentation is not written.

 

Do you have working dual eth at one time ?

Best Regards

Radim

 

Hi @ravo ,

 

I am happy to see your success.

I haven't used both eth interfaces at once in an Azure RTOS app yet. I am going to do so. For now I wanted to finish the initialization. You are correct, you have to modify nx_stm32_eth_driver.c. Reading the NetXDuo manual is probably a good place to start. In my opinion, it all comes down to modifying the IPInstance structure.

 

If you find a solution, I encourage you to provide a sample instruction, as I will do the same.

 

Best,

J. Schneider

Dear @jschneider 

I am in contact wit ST support, there is need to modify nx_stm32_eth_driver.c/h - currently support only one interface at time. HAL already have multiple network interface.

I tried to look at driver which has already multiple instances support - nx_ram_network_driver.c/h, located in \STM32Cube_FW_MP13_V1.0.0\Middlewares\ST\netxduo\common\src - but it could be a lot of work.

So I will wait when ST update nx_stm32_eth_driver.c/h

If I will have some news I will post here.

Regards Radim

ravo
Senior

Dear @jschneider 

Do you have some news ? I have only small update, the support for dual eth should be in next release (2 - 3 months)

Radim

Hi @ravo 

Thank you for your update. For now I have some other priorities. Waiting for the support seems like a better option.

 

Best,

J. Schneider