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.

ISR can't be fired on EVM6472 with CCS4.0

I tried to transplant an example described in sprab20 from EVM 6474 to EVM 6472 and I also made some modifications.C code as follow:

#include <std.h>

#include <log.h>

#include <c6x.h>

#include "ipccfg.h"

#include "c64.h"

#include "cslr_intgen.h"

#include <stdio.h>

CSL_IntgenRegs *ipcRegsPtr = (CSL_IntgenRegs*)(0x02880800);

void sendIPCmessage(unsigned long msg);


main()

{

LOG_printf(&trace, "starting main on core %d\n",DNUM);

C64_enableIER(1<<4);

}

unsigned long received_message;

unsigned long message = 268435454;


void IPCisr(void)

{

SEM_post(&SEM0);

 

received_message = (ipcRegsPtr->IPCGR1 >> 4) & 0xFFFFFFF; 

ipcRegsPtr->IPCAR1 = 0xFFFFFFFF;

}


void sendIPCmessagePRD(){

      switch(DNUM){

                  case 0:

                      LOG_printf(&trace, "sending IPC on core %d",DNUM);

                     sendIPCmessage(message);

                     break;

               case 1:

                     LOG_printf(&trace, "receiving IPC from core %d",0);

                     break;

};


message++;


}



void sendIPCmessage(unsigned long msg)

{


ipcRegsPtr->IPCGR1 = (msg & 0xFFFFFFF) << 4;

 

ipcRegsPtr->IPCGR1 |=1;

 

}


void receiveIPCTask0()

{

while(1){

        SEM_pend(&SEM0,SYS_FOREVER);

        LOG_printf(&trace,"got message %d from core 0", received_message);

        };

}

 

And I use the DSP/BIOS,the configuration as follow:

 

HWI_INT4 is the object that corresponds to the inter-core interrupt,  with the interrupt selection number 84.the corresponding software function is  IPCisr,;

PRDipcsend is a periodic function that is responsible for sending messages.The corresponding software function is sendIPCmessagePRD;

TSK0 is processing messages from cores 0. The corresponding software function is receiveIPCTask0 which  run forever and pend on SEM0.

 

 

But when I run this same program in core0 and core1 simultaneously on EVM6472  via CCS4.0 ,it seems that the program on core1 can't get into the function IPCisr,and what I got from the Log window of  Core1 are always "receiving IPC from core 0",which means I can't get the message "got message %d from core 0".


Is there something wrong with this program?Someone please help me.Hoping for the reply.

 

 

 

 

 

  • Kaiqi Yang,

    There are several differences between the C6474 implementation and that of the C6472. I have not looked at this app note and have not gone through the same process, but I do have an example CCSv4 project that runs on the C6472. This exported-to-archive project C6472_Edma_IPC_BIOS.zip is attached. It is a demo program that uses EDMA3 transfers/interrupts, IPC interrupts, and runs under DSP/BIOS 5.

    The project includes an IPC Interrupt Dispatcher and an EDMA3 Interrupt Dispatcher with some improvements over what comes with the CSL.

    Please let me know if this is of any help, or if you have any problems with it.

    If this is not the type of help that you need, please reply back with what you need your application to do.

    Regards,
    RandyP

     

    If this answers your question, please click the  Verify Answer  button below. If not, please reply back with more information.

    C6472_Edma_IPC_BIOS.zip
  • Thank you for your reply!My problem has been solved after I read the datasheet of 6472 carefully.I found that the pointer should point to 0x02A80540 on C6472,and in my former C code it pointed to 0x02880800.But thank you all the same and I will tyr your example.