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.
I tried to run the ethernet_ex10_lowlatency_interrupt example from C2000ware 4.02 on an F28388D control card (MCU063B).
For CM initialization I first ran ethernet_c28x_config on CPU1 and then started ethernet_ex10_lowlatency_interrupt on M4.
My expectation was that the contents of pData[] would appear in rxBuffer[] but whenever I stop the M4 it is somewhere in ethernet.c or in genericISR(void) from ethernet_ex10_lowlatency_interrupt and rxBuffer[] remains filled with 0.
I would appreciate any hints on what I could be doing wrong.
Best regards
Johannes
Johannes,
Are you getting the interrupts - transmit and receive interrupts? Are the count - transmitISRCount and receiveISRCount incrementing?
Will try to run the example at my end and update you.
Best Regards
Siddharth
Hi Siddharth,
as soon as des2 is initialized in SendPacket()
genericISRCount is being incremented at a very high rate while the other ISRCounts remain 0.
Best regards
Johannes
Johannes,
I tried to run the example here and observe the same behavior . genericISRCount is being incremented.
Looks like there is a problem with the genericISR function, it is not clearing the interrupts correctly and hence it is reentering the interrupt ISR again and again.
If I manually clear the interrupt using the Memory browser, it works fine and the rxBuffer also receives the data.
Will report this issue and get it fixed in the next release of C2000Ware.
Best Regards
Siddharth
Hi Siddharth,
a hole lot of interrupts is cleared at the end of genericISR:
//
//Clear the interrupts at hardware
//
Ethernet_clearDMAChannelInterrupt(
EMAC_BASE,
ETHERNET_DMA_CHANNEL_NUM_0,
ETHERNET_DMA_CH0_STATUS_ETI |
ETHERNET_DMA_CH0_STATUS_AIS);
Ethernet_clearDMAChannelInterrupt(
EMAC_BASE,
ETHERNET_DMA_CHANNEL_NUM_0,
ETHERNET_DMA_CH0_STATUS_ERI | ETHERNET_DMA_CH0_STATUS_NIS);
How do I need to modify that code in order to make genericISR() work correctly?
Best regards
Johannes
Johannes,
Will update the genericISR code and share it with you. I manually cleared the interrupt flags in the memory browser to get the example working..
Best Regards
Siddharth
Johnanes,
With the following updated ISR code, the example works fine.
interrupt void genericISR(void) { uint16_t fragNumber; genericISRCount++; // //Get the count of how many chunks of packets have come in //If the Progammable Buffer length 32 bytes //In threshold mode for each 32 bytes of DMA an early Rx interrupt //is asserted by hardware which is serviced in this Generic ISR // fragNumber = Ethernet_getRxERICount( EMAC_BASE, ETHERNET_DMA_CHANNEL_NUM_0); // //Callback for signalling the arrival of chunk // IntermediateFragmentCallback(fragNumber); // //Clear the interrupts at hardware // Ethernet_clearDMAChannelInterrupt( EMAC_BASE, ETHERNET_DMA_CHANNEL_NUM_0, ETHERNET_DMA_CH0_STATUS_ETI | ETHERNET_DMA_CH0_STATUS_AIS| ETHERNET_DMA_CH0_STATUS_TPS ); Ethernet_clearDMAChannelInterrupt( EMAC_BASE, ETHERNET_DMA_CHANNEL_NUM_0, ETHERNET_DMA_CH0_STATUS_ERI | ETHERNET_DMA_CH0_STATUS_NIS | ETHERNET_DMA_CH0_STATUS_TBU); }
Best Regards
Siddharth