cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet and LWIP on STM32F769 Discovery Board configuration issue

ED2
Associate

Hello,

Using

  • STM32CubeIDE V1.14.1
  • TGFX 4.23.1
  • STM32F769I-Disco Board

I want to use the ETH port to communicate with other devices.The project was generated with TGFX. I configured ETH port in RM|| mode, configured LWIP with disabled DHCP and manual IP settings, platform settings set to LAN8742. In KeyOptions changed MEM_SIZE to 14x1024Bytes. In system core:cortex M7 section i have added 2 additional sections for SRAM2(16KB and 1KB) with base Adress 0x2007C000,

After code generation, i have modified ethernetif.c:

/* USER CODE BEGIN 2 */

extern u8_t __attribute__((section(".RxPool"))) memp_memory_RX_POOL_base[];

/* USER CODE END 2 */

Additionaly i have modified flash.ld:

MEMORY

{

RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K

FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K

QUADSPI (r) : ORIGIN = 0x90000000, LENGTH = 64M

SDRAM (xrw) : ORIGIN = 0xC0000000, LENGTH = 16M

RAM_D2 (xrw) : ORIGIN = 0x2007C000, LENGTH = 16K

}

and

.lwip_sec (NOLOAD) :

{

. = ABSOLUTE(0x2007C000);

*(.RxDecripSection)

. = ABSOLUTE(0x2007C0A0);

*(.TxDecripSection)

. = ABSOLUTE(0x2007C140);

*(.RxPool)

} >RAM_D2

 Actualy the program get stuck on MX_LWIP_Init();

in udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());

I assume there is still a problem with dynamical memory allocation?

Is there an actual working example for ETH/LWIP configuration on STM32F7? Older examples

are not compatible with actual ETH/LWIP libs from code generator.

 

Thanks in advance

Eduard

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

Hello,

Is there an actual working example for ETH/LWIP configuration on STM32F7? Older examples

are not compatible with actual ETH/LWIP libs from code generator.


Not sure what do you mean by "Older examples are not compatible with actual ETH/LWIP libs"

But the LWIP examples are located here for this board.

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

2 REPLIES 2
SofLit
ST Employee

Hello,

Is there an actual working example for ETH/LWIP configuration on STM32F7? Older examples

are not compatible with actual ETH/LWIP libs from code generator.


Not sure what do you mean by "Older examples are not compatible with actual ETH/LWIP libs"

But the LWIP examples are located here for this board.

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.
ED2
Associate

Thanks for the link with LWIP examples, it helped me to find a solution. But the  generated from CubeIDE ethernetif.c data had many differences to ethernetif.c in example.

Kind Regards,

Eduard