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.

C6711D: DSP hangs sometimes when starting to write to McBSP

Dear all,

I like to ask if somebody can give me a hint to solve my problem with the McBSP serial port of C6711D.

On some systems I can see a very strange behavior of the McBSP port:

- I use this port as SPI master.

- I verified the configuration according to the reference documents and C7611D data-sheet.

- I notice the following problem:

   - When writing to the port by using McBSP_write() the DSP does not issue data nor clock and stops working.

   - When running with the emulator from CCS and the problem occurs, then I cannot stop the DSP anymore and the emulator ends with an error message because the DSP is no more replying.

   - Sometimes the writing works suddenly and then I can use this port as long as i want until I switch off the system for about 20 minutes.

- If I do not use the McBSP_write function then the DSP runs correctly all the time.

I hope that somebody can give me a hint, what I shall check. I have checked so far all McBSP issues, the clock (PLL) configuration, the power supply system around the

chip.

Many thanks in advance

Dieter Schweizer

  • Hi Dieter Schweizer,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com).

    Please find the DSP Integration Workshop materials from below link has examples to McBSP. (Lab 6)

    http://processors.wiki.ti.com/index.php/TMS320C6x1x_DSP_Integration_Workshop#Workshop_Materials

    Could you please compare the configuration with examples provided in the above link?

    Thanks.

  • Dear Rajasekaran,

    thank you very much for your hints about McBSP configuration. I have checked it and everything was correct.

    I continued my investigations and I have found that the problem comes from another source which is related to the external SDRAM I use in the application. I have found the hang at the use of McBSP was more related to the code generated by the compiler than to the function itself. For example by adding or removing another part to the program the problem of hang of the DSP moved to another part of the program, but always at a moment when external SDRAM was used for some operation.

    Then I have seen that the problem could be moved from one board to the other by just moving the SDRAM to the other board. We can think that the SDRAM is broken, but we have seen the same problem with several SDRAMs and with several type of SDRAMs. First thought was to check power supply and all SDRAM related signals, but they seem all ok and with enough timing margin. As I explained in my first post, the problem sometimes is present and by waiting a certain time in OFF state (> 15 minutes) the problem disappears or visa versa.

    Now my question is if there is a problem of correct SDRAM initialization which could cause such starnge behavior.

    The SDRAM is initialized from boot.asm after PLL setup by writing the corresponding EMIF registers. Then the application program is copied from FLASH to SDRAM and started.

    Do you know any known issues about SDRAM which has to be repected to make sure that the SDRAM works correctly?

    Best regards

    Dieter