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.

TMS320F2802: Need technical support for SPI clock

Part Number: TMS320F2802

Hi,

I want to test SPI data flash IC to validate memory corruption issue.

I am using TMS320F2802(C2000 Piccolo LaunchPad Evaluation kit) interfaced with AT45DB321 SPI data flash IC.

System Configuration :

IDE : Code Composer Studio ( Version: 6.0.1.00040 )

Internal oscillator : 60 Mhz ( LSPCLK )

SPI Clock(max. up to) : 15 Mhz

SPI Block : A

Mode : Polling mode

At less than 5 Mhz , I am able to read/write data flash chip successfully over SPI.

Problem Statement :

  1. I am not able to communicate with SPI data flash on 5 and above 5 Mhz SPI clock frequency.

Please find the captured erroneous wave from :

  • 1 Mhz : image 1MHz.png;(Yellow: MOSI, Blue: Clk, Pink: MISO, Green: CS)  Behaves as expected
  • 5 Mhz : image 5MHz.png; (Yellow: MOSI, Blue: Clk, Pink: MISO, Green: CS)  Erroneous behavior 
  • 10 Mhz : image 10MHz.png; (Yellow: MOSI, Blue: Clk, Pink: MISO, Green: CS)  Erroneous behavior
  1. Chip Select pin driving issue(see image Chip_select.jpg):  In AT45DB321_StatusRegisterRead1 function I put the break point at the start and do step over to debug step by step. So for every step when it sends data on SPI, chip select becomes low to high automatically even though I am not handling chip select in between.(In image Yellow: CS, Blue: Clk, Green: MOSI )

 Code Brief : Attached source code zip file-  DFS528_MULCK.7z 

  • Basic initialization done like CLK,CPU,Flash ,GPIO and SPI etc.
  • GPIO configuration / Initialization
  • SPI Initialization 
  • Function called AT45DB321_StatusRegisterRead1 : In these function I am reading data flash chip status register. (Cmd 0xD7)
  • After that I am writing data and reading data.

Can you please provide your valuable inputs for same?FilesToUpload.7z

  • Manoj,

    Considering the fact that you are able to communicate up to 5MHz, it means that there should not be a code problem or underlying structure that is preventing you from reaching higher speeds, but looking at the images you shared, the MISO signal has a lot going on at higher frequencies. Are there any pullups on the trace? Is there anything else on this signal that could be impeding the FLASH device from driving it at high speeds?

    Glancing at your code, the SPISTE is actually being driven by the SPI module so after each word , the SPISTE will be driven as inactive. You initially set up the GPIO mux for GPIO19 to be the SPI function, and I never see it changed to the standard GPIO function. I don't see the code for "SPI_setSteInv()" but i suspect you are attempting to just set/clear GPIO19 as if it were a GPIO.

    Take a look at these things and let me know what you come up with.

    -Mark
  • Manoj,

    Have you been able to resolve your issues?

    Thanks,
    Mark
  • Manoj,

    I am going to close this thread due to no activity, please follow up if you have any additional questions.


    Thanks,
    Mark