cancel
Showing results for 
Search instead for 
Did you mean: 

Defining again ETH_RX_DESC_CNT and ETH_TX_DESC_CNT

imranhassan84
Associate II

I am working to send data continuously using TCP/IP, LWIP and free-RTOS. I created three tasks and using one task to send data. Each data packet is 1460 bytes and after sending around 300K packets the system halts and resets. I wanted to increase the size of descript ETH_RX_DESC_CNT and ETH_TX_DESC_CNT from 4 to 8 to check the performance. I do not want to change it in .ioc file as it will generate code again that will result in deletion of my code. I tried to redefine using every method, in compiler preprocess, main.h, stm32h7rsxx_hal_conf.h, stm32h7rsxx_hal_eth.h, ethernetif.c but nothing works. The value remains same 4U (default).

How I can do that?

Edit: I am using Nucleo-H7S3L8 board

3 REPLIES 3
Pavel A.
Super User

The number of descriptors is not defined in the project files. The default numbers are here:

https://github.com/STMicroelectronics/stm32h7rsxx-hal-driver/blob/181ba7a7e5f67cd0018dff060969b48cfb610831/Inc/stm32h7rsxx_hal_eth.h#L41

You can redefine in the compiler preprocessor settings or stm32h7rsxx_hal_conf.h. 

imranhassan84
Associate II

Thanks for the reply. 

I did in compiler preprocessor (as shown in figure attached) and to check the value I am printing on UART in ethernet.c (in low_level_init() function )but it is unchanged.

    printf("DMARxDscrTab=%p DMATxDscrTab=%p RX_POOL=%p\n", DMARxDscrTab, DMATxDscrTab, memp_memory_RX_POOL_base);
    printf("ETH_RX_DESC_CNT=%u  ETH_TX_DESC_CNT=%u  ETH_RX_BUFFER_CNT=%u\r\n",
           (unsigned)ETH_RX_DESC_CNT,
           (unsigned)ETH_TX_DESC_CNT,
           (unsigned)ETH_RX_BUFFER_CNT);


I also tried to change in stm32h7rsxx_hal_conf.h but i always give me makefile error. I tried define again (overwrite), undefine and define again but I am not able to.


imranhassan84_0-1760037567423.png

 

Thanks for the reply. 

I did in compiler preprocessor (as shown in figure attached) and to check the value I am printing on UART in ethernet.c (in low_level_init() function )but it is unchanged.

 

    printf("DMARxDscrTab=%p DMATxDscrTab=%p RX_POOL=%p\n", DMARxDscrTab, DMATxDscrTab, memp_memory_RX_POOL_base);
    printf("ETH_RX_DESC_CNT=%u  ETH_TX_DESC_CNT=%u  ETH_RX_BUFFER_CNT=%u\r\n",
           (unsigned)ETH_RX_DESC_CNT,
           (unsigned)ETH_TX_DESC_CNT,
           (unsigned)ETH_RX_BUFFER_CNT);

 


I also tried to change in stm32h7rsxx_hal_conf.h but i always give me makefile error. I tried define again (overwrite), undefine and define again but I am not able to.


imranhassan84_0-1760037567423.png