lwip - tcpecoserver - transmit data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-10-21 06:56 AM
Hello.
I am using an STM32H743BI processor in the project.
I am using freertos.
I have completed the connection setup from ethernet. I can ping the device and connect as tcpclient.
In the working scenario I need to send data at 100ms intervals as long as the client is connected to the client.
I am having trouble with this, after a few messages the device goes to hardfault as you can see in the picture below.
#define MEM_SIZE 10*1024
/*----- Default Value for H7 devices: 0x30044000 -----*/
#define LWIP_RAM_HEAP_POINTER 0x30004000
you can also find the whole lwipopts.h file attached.
I will also leave here the settings I made about memory.
MPU_InitStruct.Number = MPU_REGION_NUMBER2;
MPU_InitStruct.BaseAddress = 0x30004000;
MPU_InitStruct.Size = MPU_REGION_SIZE_32KB;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1;
MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
I am using heap1 as freertos heap and I set the size to 200000bytes.
Thanks for your helps.
Best Regards.
EMRE
- Labels:
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-10-21 07:38 AM
Hello @emre ozdemir ,
I advise you to properly debug the Hardfault to know for sure what is causing your problem in the first place, this article may help you in the debug process .
Also, the code snippet for MPU config that you shared seems to be lacking.
I recommend you follow the example STM32H7-LwIP-Examples/STM32H743_Nucleo_ETH at main · stm32-hotspot/STM32H7-LwIP-Examples (github.com)
Take special care with DMA descriptors and RX pool placement in the FLASH.ld file of your project.
Regards