AnsweredAssumed Answered

PPI and debugging via VisualDSP++ thru JTAG

Question asked by tcmichals on Nov 17, 2010
Latest reply on Nov 23, 2010 by tcmichals

Problem: Resuming execution after software or HW break point the PPI DMA keeps interrupting the processor and never serviced.  If I don't have any breakpoints  everything works great!!!

 

General flow of the code:

- BF527

- Start VDK

- call adi_ssl_Init

- set up TCP/IP stack

- setup serial port

- setup flash drivers (SPI)

- setup PPI driver

     - using exernal frame sync

     - 100Khz/1024  ISR rate

 

- breakpoint in ISR of the PPI call back, or just stop and resume

Result:

SIC_ISR0 is 00208040 so the _adi_init_NestingISR is called due to DMA0 has issued an ISR

adi_dma.c DataHandler ISR

- Also, since the PPI is driven via external clock etc. this is still happening while the debugger is stopped

 

static ADI_INT_HANDLER(DataHandler) // DMA handler
{


    unsigned int                i;                  // counter
    ADI_INT_HANDLER_RESULT      Result;             // result
    ADI_DMA_CHANNEL             *pChannel;          // pointer to the channel we're working on
    u32                         AssertedFlag;       // flag indicating whether or not the channel has an interrupt asserted

// avoid casts
    pChannel = (ADI_DMA_CHANNEL *)ClientArg;
    Result = ADI_INT_RESULT_NOT_PROCESSED;

 

    // assume the channel is not interrupting
    AssertedFlag = FALSE;

 

    // IF (this channel is asserting an interrupt cause DMA_DONE is set)
    if (pChannel->IRQStatus->b_DMA_DONE == ADI_DMA_DONE_DONE) { <----HERE the b_DMA_DONE is 0 but it is interrupting

 

        // clear the interrupt (need to do this funky thing with the casts cause
        // we get a DMA error if we try and write to RO bits)
        *(u16 *)pChannel->IRQStatus = ADI_DMA_DONE_DONE;

 

        // set flag to show this channel is interrupting
        AssertedFlag = TRUE;

 

    // ENDIF
    }

 

 

If I go and turn off the PPI using PPI_CONTROL register, code starts executing...

 

I see that the PPI Status is 0x1000 I guess this would case a PPI DMA interrupt also? I that it cleared the SIC..

I cannot live without the software debugger !!!

Outcomes