2024-01-17 02:13 AM - edited 2024-01-17 02:51 AM
Hello,
I have generated a simple UI from TouchGFX Designer and try to enable the Ethernet connectivity, with an external PHY lan8742A. The steps I did:
1) Configuring MPU regions like this:
2) After that I have enable the global interrupt for ETH peripheral like this:
3) Subsequently in Middleware section I have enabled the LwIP, set the platform and changed only MEM_SIZE and HEAP_POINTER like this:
while I have disabled the DHCP and set my static IP Address.
4) Going now to the ethernetif.c file I declared the RxPOOL section like this:
extern u8_t __attribute__((section(".RxPool"))) memp_memory_RX_POOL_base[];
5) Finally, I went to the linker script .FLASH and enabled the .lwip_sec working in RAM_D2 like this:
.lwip_sec (NOLOAD) :
{
. = ABSOLUTE(0x30000000);
*(.RxDecripSection)
. = ABSOLUTE(0x30000200);
*(.TxDecripSection)
. = ABSOLUTE(0x30000400);
*(.RxPool)
} >RAM_D2
I am not doing something else, I only use the generated code from TouchGFX Designer which runs freeRTOS V2, and the code that I have generated from CUBEMX.
I am able to ping my static IP for at least 20 minutes and After that It corrupts with a hardfault error (PRICISER), which I cannot understand why it is doing that, and also how to trace it to investigate the error. All the other parameters are left as default with the total heap size like:
#define configTOTAL_HEAP_SIZE ((size_t)131072)
Can someone explain to me what I should do or might the CUBEMX has broken code with bugs?
2024-01-17 04:55 AM
Probably no one can help. Thank you.