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.

configs/initializations/cares to be taken for SRIO doorbell

Hi All,

         In the LoopbackDioIsrExample Project,

/* Set the Doorbell route to determine which routing table is to be used

* This configuration implies that the Interrupt Routing Table is configured as

* follows:-

* Interrupt Destination 0 - INTDST 16

* Interrupt Destination 1 - INTDST 17

* Interrupt Destination 2 - INTDST 18

* Interrupt Destination 3 - INTDST 19

*/

CSL_SRIO_SetDoorbellRoute(hSrio, 0);

so the interrupts will be routed to dedicated INTDST 16,17,18,19 [pRIMARY Interrupts] which are in turn connected to event Id = 20.

so i hook an ISR using EventCombiner_dispatchPlug(), so whenever event Id 20 is triggered it will invoke the ISR().

in the ISR(),

i get the doorbell status using CSL_SRIO_GetDoorbellPendingInterrupt

and clear the same using

CSL_SRIO_ClearDoorbellPendingInterrupt

now my question is

1. when i run the code on core0 (srio loopback or data to itself (ofcourse its not to itself, it can  be shared memory) ) and route the doorbell to itself, things work fine

2. when i run the code on core0 (srio loopback or data to itself (ofcourse its not to itself, it can  be shared memory) ) and route the doorbell to core1(only on last packet),i get the last packet with following error completion code.

0b110 — “Retry” DOORBELL response received, or Atomic Test-and-swap was not allowed (semaphore in
use)""

and i see only one doorbellcount with correct bit being set in reg 1.

so i understand that there was a earlier post on this and it ended in No conclusion

http://e2e.ti.com/support/embedded/bios/f/355/p/159139/604600.aspx#604600

1. EventCombiner_dispatchPlug code is there in both core0 and core1, ssince i am routing doorbells to core1, i expect it to be get invoked and it does get invoked, but with error  completion code.

2. if i comment the EventCombiner_dispatchPlug in core0, then i dont see the count incremented in core1. please let me know how the EventCombiner_dispatchPlug in core0 is linked to core1 doorbell interrupt.

3. i put EventCombiner_dispatchPlug for both core0 and core1, and i see completion code as 6 for last packet (for which doorbell was sent), why is this and what care should be taken? please help 

Thanks

RC Reddy

  • Hi RC Reddy,

    Can you post your code here so that I can take a look at the changes that you have made while trying to route the doorbell to core 1?

    Thanks,

    Jason

  • Hi,
    Thanks and please check the code in attachment.

    Thanks4812.Loop_DoorBell_Changes.zip
    RC Reddy

  • RCReddy,

    It is my understanding that the completion code that you are getting (doorbell retry) should only occur if a doorbell occurs on a bit that is already set and has not been cleared. Can you check and make sure that this bit is cleared at the beginning of your program?

    Another thing that stands out to me is that you seem to be mapping core 0's host interrupt 8 to both the system event 112 (INTDST0) and system event 20 (INTDST16). You then plug two ISR's to the same host event 8 (myDioTxCompletionIsr and DoorBellIsr). So this may cause both ISR's to be ran on each successful DIO completion.

    One more thing that would differ between trying to have core 0 send data to itself as opposed to core 1. If you have your data section linked to L2SRAM then your dstDataBufPtr would be located in the local L2SRAM of core 0 (begins at 0x00800000). You may need to convert this address into the global address of core 0 using the l2_global_address(Uint32 addr) function that is provided in the loopbackDioIsr.c file. The DIO of the SRIO needs global L2SRAM addresses to function properly.

    Are you trying to learn more about doorbell interrupts as a means of knowing when the end of a DIO transfer completes? Or do you just want to use doorbell interrupts to trigger an interrupt on another core or another device?

     

    Thanks,

    Jason Reeder