NetworkInterface for TMS320F2838x CM

I have write a basic network driver for FreeRTOS-PLUS TCP FreeRTOS-Plus tcp driver for TMS320F2838x ( This driver uses the ethernet.h library from driverlib_cm from texas instrument. All your feedback and advice are greatly appreciated to improve this driver

1 Like

Thank you for sharing this network interface.
Is it using zero-copy techniques?

When this statement is executed, are you sure that the sending is complete?

Why do you clear pxDescriptor->pucEthernetBuffer before freeing the network buffer?

Does the EMAC have a buffer of outgoing packets?

Just get more information, can you attach your FreeRTOSIPConfig.h header please? Thanks.

Thanks @adrien for writting the driver.
Please create a PR in GitHub for the same for repo. We will take it up from there and review the same.

No not at the moment this is the next step

no I need to add a test

good question, it’s actually not necessary

I do not think so

Hello Adrien,

This time I looked much more into detail, and added some comments:

tms320f2838x.v2.c (14.4 KB)

The comments start with // _HT_

Have you already seen this call-back from the TI library?

     /** Free packet call back called after the completion of Tx and
       when the buffer needs to handled back to application */
    void (*pfcbFreePacket )( Ethernet_Handle handleApplication,
                             Ethernet_Pkt_Desc *pPacket);

It can be useful when you want to send multiple packets without waiting.
We normally use a counting semaphore, see for example here.

If you have a TX queue of 3 descriptors, your semaphore will have a max count of 3, and an initial value of 3 as well.
The function NetworkInterfaceOutput() will decrease the semaphore, it will be increased after the callback.
This mechanism may help you in finding out why the ETHERNET_DESC_OWNER bit wasn’t cleared, as you wrote.