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.

Lost interrupt when using printf

Other Parts Discussed in Thread: SYSBIOS

Good morning support,

I am not sure I am in the correct forum to ask my question. I could not find similar issues in the sysbios forum and since my problem occurs on the C6670 using the function platform_write, I would start reporting my problem here...

As a test between and host and a targer, we wrote a tiny pieice of code that would illustrate how fast the host and the target can send each other PCIe interrupts.

The example is pretty simple:

1) I create a task that does nothing at very low priority

   taskParams.instance->name = "TestInterrupt";

    taskParams.stackSize = 0x1000;

    taskParams.priority = 5;  

void TestInterruptTask(UArg a0, UArg a1)

{

while(1) {

  Task_sleep(500);

 }  

}

2) I register a subroutine to a hardware interrupt. I even make this quite high priority (11) at the interrupt level.

gChannelHwiHandle = Hwi_create(11, MsiIsrHandler, &hwiParams, &eb);

the parameter for the HWI are

hwiParams.arg = 1;     hwiParams.eventId = PCIE_MSI_INT0_EVNT;     hwiParams.maskSetting = Hwi_MaskingOption_SELF;  where  PCIE_MSI_INT0_EVNT is

PCIEXpress_MSI_INTn event form CpInt.

The subroutine MsiIsrHandler does nothing else that sending back an interrupt and incrementing a counter (how many received and how many sent)

 

Our code seemed to be working quite fine but we could not see anything happening, Therefore, in the sleeping task we decided to add a print function that prints the interrupt counters.

platform_write("snt [%d], rcv [%d]\n",cnt1,cnt2);

Suddenly the target started to miss interrupt send by the host. platform_write is a simple printf function that occurs once in a while. The function is unmodified from its original code and do not use any of the sys bios print functions.

It seems that when the printf occurs, the DSP is not able to receive interrupts which is very strange...

Would you have any idea?

Best regards

Aymeric