2024-04-25 05:19 AM
Greetings!
We have custom board based on STM32F745VGT6 having Ethernet peripheral over RMII mode.
Previously with the older version of Cube MX and Library our Ethernet was working, after the new update of library there are some major changes in the library and now it is not working i.e. we are unable to ping the board.
We tried to follow the example of H7 but there was not positive result.
If someone has working example or has reference for F7 it would be grateful.
If something from out project is required (configuration), please do let me know.
Regards,
Tirthraj Solanki
2024-04-26 05:59 AM
Hello @TSola.1 ,
I assume you are using LWIP for your last working project and if I'm understanding this clearly the project is no more functional after cubeMX and Cube firmware update to the latest version so could you mention the version of the "library" and tools you are using.
As a suggestion I would like to know if there were any software changes when implementing it with your newer version of tools and drivers maybe if you could also share the configuration done with CubeMX to the Ethernet peripheral that could affect your app behavior.
I would assume based on your description that these could not be related to your hardware setup because of the already working project on your costume board but still I would recommend checking the Pin assignment for Ethernet as it could be different from the one selected by default with CubeMX so maybe you could compare the HAL_ETH_MspInit() in your existing project and your newer generated one.
"After the new update of library" are you talking about the LWIP library in here?
you can find a working example in this link developed for NUCLEO-F746ZG but can be easily ported to your needs.
BR
2024-04-29 02:30 AM
Hi @STea,
Yes, you are right we are using LWIP and after update of tools we are unable to have functional Ethernet.
Cube Firmware Version : 1.17.1 (STM32Cube FW_F7 V1.17.1)
Also we are not directly implementing this in our application, we have created a new project only to check Ethernet.
I verified the pin connection and they seems to be correct.
To be specific i am talking about ST's Ethernet driver update (library).
I have also tried the example link provided, but it didn't gave any positive result.
Below is the configurations used in my project.
NOTE: I am using Ehternet SWITCH and not PHY.
Configuration of the project:
void MPU_Config(void)
{
MPU_Region_InitTypeDef MPU_InitStruct = {0};
/* Disables the MPU */
HAL_MPU_Disable();
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER0;
MPU_InitStruct.BaseAddress = 0x0;
MPU_InitStruct.Size = MPU_REGION_SIZE_4GB;
MPU_InitStruct.SubRegionDisable = 0x87;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Number = MPU_REGION_NUMBER1;
MPU_InitStruct.BaseAddress = 0x20048000;
MPU_InitStruct.Size = MPU_REGION_SIZE_16KB;
MPU_InitStruct.SubRegionDisable = 0x0;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1;
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/** Initializes and configures the Region and the memory to be protected
*/
MPU_InitStruct.Number = MPU_REGION_NUMBER2;
MPU_InitStruct.BaseAddress = 0x2004C000;
MPU_InitStruct.Size = MPU_REGION_SIZE_1KB;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/* Enables the MPU */
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);
}
/* Enable I-Cache---------------------------------------------------------*/
SCB_EnableICache();
/* Enable D-Cache---------------------------------------------------------*/
SCB_EnableDCache();
/*Memory configuration in STM32F745VGTX_FLASH.ld*/
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K
Memory_B1(xrw) : ORIGIN = 0x2004C000, LENGTH = 0xA0
Memory_B2(xrw) : ORIGIN = 0x2004C0A0, LENGTH = 0xA0
}
.RxDecripSection (NOLOAD) : { *(.RxDescripSection) } >Memory_B1
.TxDescripSection (NOLOAD) : { *(.TxDescripSection) } >Memory_B2
Please do let me know if something else is required from my side.
Regards,