This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28388D: Interrupt config in enet_lwip Ethernet_init()

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hello there,

I'm looking into the enet_lwip examples as a starting point for porting lwIP to a SYS/BIOS application. I was wondering about interrupts that are enabled/disabled in the Ethernet_init() function in enet_lwip.c.

The call to Ethernet_getHandle() enables TI, TBU, RI, RBU, AIS, NIS interrupts for DMA channels 0 and 1. Then after that call there's a call to Ethernet_disableDmaInterrupt(), to disable the TBU and NIS interrupts. But it's done only for channel 0. Why not for channel 1?
And the same for the next call to Ethernet_enableMTLInterrupt(), which is done only for queue 0.

Regarding interrupt handling in general, do I understand correctly that the 'generic ISR' is a collection of all (enabled) interrupts, so the SBD interrupt as mentioned in the TRM? (what does SBD stand for anyway?)
And the TX and RX interrupts are only the TI and RI interrupts as mentioned in the DMA_CHx_Status register?

Thanks and kind regards,
Arjan

  • Arjan, 

    The example uses only one queue and channel and hence it Is disabling the interrupts only for that channel. By default , the call to Ethernet_getHandle() enables interrupts for both DMA channels.

    Your understanding of the interrupt handling is correct. I am also not sure on what SBD interrupt stands for (something I will have to check with the design team :-) )

    Best Regards

    Siddharth

  • Thanks for your reply Siddharth,

    So is using only one queue and one channel the default register setting? Because I don't see any explicit initialization for that in enet_lwip.

    Then how would I go about using all channels and queues in an application, is there an example? Which API to use, or register(s) to set? Seems to me the best performance of the Ethernet interface would be to use all available resources. As far as I can see the driverlib_cm Ethernet driver API can handle multiple channels.

    Kind regards,
    Arjan

  • Arjan,

    The lwIP adaptation layer is agnostic of DMA-specific paramters, such as channel number or channel parameters. The current example uses only one DMA channel , there is no such example which uses all channels. 

    Best Regards

    Siddharth

  • Hi Siddarth,

    I didn't mean specifically a lwIP example, but a generic driver example. At some point the driverlib_cm Ethernet APIs must have been tested in an application, right?

    Kind regards,
    Arjan

  • Arjan,

    The other examples that are provided are available in the C:\ti\c2000\C2000Ware_4_01_00_00\driverlib\f2838x\examples\cm\ethernet folder. Most of these examples are using DMA Channel 0 except for the vlan filtering example which uses both channels.  

    Best Regards

    Siddharth

  • Will have a look at that Siddharth, thanks.