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.

SPI EDMA with Linux and DSP/BIOS

Other Parts Discussed in Thread: OMAP-L137

I am trying to write an linux / DSPLink / DSPBIOS / PSP application where the DSP uses the PSP SPI driver to read data. When I used polled mode of the SPI driver, all is well. When I use the DMA interrupt mode, the DSP program will occasionally hang in MSGQ get or SPI submit. I am using the helloDSP and the PSP SPI example as the basis for my code. Could it be a hardware conflict? Where should I look for the conflict? In the Linux code? In the DSPBIOS code?

 

  • Hi Norman Wong,

    Could you please provide us the TI Platform information and software release version information?

    Regards

    Mansoor

  • OMAP-L137 EVM Rev H from Spectrum Digital
    OMAP-L137 EVM Prototype Board

    DVSDK 03.21.00.04/linux-2.6.37
    DSPLink 1.65.00.03
    helloDSP 1.10
    BIOS 5.41.10.36
    EDMA 01.11.02.05
    PSP 01.30.01

    XDCTools 03.22.01.21
    CGT6.1.12

    SPI0: SPI Flash
    SPI1: Test interface
    UART0: Disabled
    UART1: Console
    UART2: Disabled
    McASP0: Disabled
    McASP1: Disabled

  • Hi Wong

    How have you configured the HWI?

    If you are using the TCONF tool, have you then selected 'Use Dispatcher' on the 'Dispatcher' tab?

     

    Perhaps you could post your tcf file and code?

    /Mads

  • I used the PSP SPI Example and it setups the HWI via a TCF entry. I am not familar with the TCONF tool. I might using it in the makefile and not even know it. Attached is a the ARM and DSP side code. I've broken up the code slightly different than usual. The gpp directory produces a library. The ARM side main is in the app directory.

    8037.spi_adc_dsplink.zip

  • Hi Norman

    The TCONF tool comes with Code Composer Studio (CCS) and is used for configuring DSP/BIOS (it creates the .tcf file!).

     

    I am sorry but I do not have the time to go through all of your code (I was kind of hoping to see a smaller example :-). 

    It seems you are using the ECM module which the SPI driver is hooking up to.

    I cannot see that you are adding any HWI ISR (besides the ones that the ECM hooks up & DSPLINK). So I am not really sure where the problem is.

     

    I would start by stripping down your code, until you have the smallest working piece of SW with ISRs enabled. 

    Do you have a JTAG so you can load code directly into the DSP? (then you could remove DSP/LINK from your DSP code)

    I would make the smallest working program with SPI ISR enabled and perhaps DMA, and dump the data to LOG_printf, so you can read the output via. CCS and work my way up...

     

    Best wishes,

    Mads

  • Thanks for taking a look. I do have a BIOS5 only version that runs just fine with EDMA SPI. Adding DSPLink seems to break EDMA SPI. DSPLink code is not setup for CCS by default. Strangely, plain SPI interrupt mode works fine. Just EDMA interrupt doesn't.

  • I've found a work-around by changing blocking calls to MSGQ_get() and GIO_submit() into non-blocking calls. I have to busy spin waiting for a message to arrive or GIO completion. I don't really consider this to be a solution but I suspect I'll have to live with it.