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.

Generating a PCI host interrupt using the TMS320DM648 DVDP evalauation board.

Other Parts Discussed in Thread: TMS320DM648

Hi There:

I'm using the TMS320DM648 DVDP evaluation board and I'm trying to make that the DSP generates a PCI interrupt for the host. I'm using a sample program that comes with the pspdrivers however I can not generate the interrupt. I'm using the following code:

            status  =    PAL_sysPCIGetMemMapReg(pciHandle,
                                            PAL_SYSPCI_STATUS_SET,
                                            PAL_SYS_PCI_READ_WRITE_SIZE_WORD,
                                            &interruptStatus);
             if(PAL_SOK  !=  status)
             {
                 PCI_DEBUG("ERROR: Unable to write the memory mapped configuration register while interrupt genration\n");
                 return;
             }

            /*
             * Set DSPINT bit in memory mapped status set register
             */

            interruptStatus    =    interruptStatus | (0x01000000u);

            /*
             * Write the status set register to trigger interrupt
             */
            status  =    PAL_sysPCISetMemMapReg(pciHandle,
                                        PAL_SYSPCI_STATUS_SET,
                                        PAL_SYS_PCI_READ_WRITE_SIZE_WORD,
                                        interruptStatus);
             if(PAL_SOK  !=  status)
             {
                 PCI_DEBUG("ERROR: Unable to write the Backend configuration register while interrupt genration\n");
                 return;
             }

After runing this piece of code, the value of the PAL_SYSPCI_STATUS_SET register is still the same as it was read before.

1.- What am I missing?

2.- Also, the original example ORs the interruptStatus variable with (0x80000000u) instead. Why? According to the SPRUEL4 (PCI User's Guide) the interrupt are located on bits 24-27, and bit 31 is reserved.

Thanks;

Gabriel

  • Gabriel,

    Gabriel Quintana said:
    1.- What am I missing?
    Have you made sure to enable the corresponding software interrupts in the PCIHINTSET registers? These must be enabled by the host before tweaking the SOFT_INTn bits inside the PCISTATSET register.

    Gabriel Quintana said:
    2.- Also, the original example ORs the interruptStatus variable with (0x80000000u) instead. Why? According to the SPRUEL4 (PCI User's Guide) the interrupt are located on bits 24-27, and bit 31 is reserved.
    Bit 31 is the DSPINT field and may not have been properly documented depending on which revision you were using. DSPINT is a host-to-DSP interrupt enable by the DSP and set by the host (I think the DSP can set this bit inside PCISTATSET as well, but there is no reason to do so).  I do see in the example that the SOFT_INT3 bit is set (mask 0x08000000) but then the DSPINT bit is enabled to generate the interrupt. I am not intimately familiar with this sample, but by the looks of it either this sample is incorrect or the DSPINT bit is not properly documented. I will research this a bit and get back to you.

  • TimHarron said:
    Bit 31 is the DSPINT field and may not have been properly documented depending on which revision you were using. DSPINT is a host-to-DSP interrupt enable by the DSP and set by the host (I think the DSP can set this bit inside PCISTATSET as well, but there is no reason to do so).  I do see in the example that the SOFT_INT3 bit is set (mask 0x08000000) but then the DSPINT bit is enabled to generate the interrupt. I am not intimately familiar with this sample, but by the looks of it either this sample is incorrect or the DSPINT bit is not properly documented. I will research this a bit and get back to you.

    I have verified that this is an error and has actually been fixed. I am not sure in which specific version of the PSP this was corrected, but the most recent (PSP 1.10.03) does have this corrected.