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.

EMAC Interrupts are not generated TMS570LS3137



Hi all, 

void main(void)
{
/* USER CODE BEGIN (3) */

......

_enable_IRQ();
_enable_FIQ();

drvStartTask(NULL);

.......

/* USER CODE END (3) */

}

where the drvStartTask() is a function that is used to initialize the ethernet protocol stack. In the same file i have also the EMACCore0RxIsr() and EMACCore0TxIsr() functions which in turn call the receive and transmit handlers respectively.

void EMACCore0RxIsr(void)
{
frame_received_handler();
}


void EMACCore0TxIsr(void)
{
frame_transmitted_handler();
}

As far as what i have understood, with IRQ or FIQ being set, upon receival of any ethernet packet, an interrupt will be generated, which calls the interrupt handler function. This happens with the lwIP demo project provided by the TI. 


I did use the same configuration(TMS570 include and source files) for my driver, and it turns out that the interrupts are not  being generated. I did check the CPSR registers and IRQ and FIQ were set to 0(enabled) and even in the VIM registers TxISR and RxISR were set.
Apart from enable IRQ and EMACCore0Tx and Rx functions is there anything else i need to set for interrupts to get generated upon frame receival ?

Please help

Thanks and regards
Peter 

  • Peter,

    We are looking into this. Our SME will get back to you soon.

     

    Hercules forum support

  • Now i found out that it was buffer descriptor initialization which is the cause for this problem.

    When i initialize the buffer descriptors as static emac_rx_bd rx_descriptor __attribute__((aligned(4)));  which has memory allocated at 0x080CF40. And i initialize this tx_descriptor in chain format and it gets properly initialized. In this case i see the hardware interrupts generated.

    When i initialize the buffer descriptors as struct emac_rx_bd *p = (struct emac_rx_bd*) 0xfc520000; which is the actual value to be initialized for DMA. Ând again i initialize this in chain format and the initialization is done successfully. And in this case, i don't see the hardware interrupts generated. 

    So, i sense the problem is somewhere defining the address location for the descriptor. How can I proceed with that ? 

    I have been asking this question in 2-3 of my posts from last 2-3 months. But i haven't got any reply except that "We are looking into this": A quick help would be appreciable.

    I've attached my project. Could anyone suggest me anything on this.. 

    Regards
    Peter3821.RTOS_PL.rar 

     

  • Hello Peter;

    Have you solved your problem? I have similar issues -- I am able to send frames, however i do not receive anything.

    Thanks;

  • May I know the test setup which is used to reproduce this scenario.I am using the project which has been provided I would like to reproduce the error scenario.