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.

TM4C1294NCPDT: Access Spansion 1 Gbit Flash through SSI interface

Part Number: TM4C1294NCPDT

Hi

My new product spin has a Spansion Flash (1Gbit) - S70FL01GS- connected through SSI interface of Tiva TM4C1294NCPDT based board, Are there any verified code base available for accessing the SPI flash form Tiva?

Thanks

Pavitra

  • Pavitra,

    My colleagues are working exactly on a driver to control a Spansion (now Cypress) memory. Although our part number is different, the protocol might be the same... Our goal is to have it working by the end of next week.

    Anyway, for now I can help with a piece of code that is surely working in SSI communication. This one talks to a 32-bit word sensor, getting a reply on the next cycle after sending a "frame command". The bus is configured at 7.5MHz.

    	uint32_t frame = 0x0A0B0C0D;
    	uint32_t rullRegister;	// 32-bit response from device
    
        frameHigh = frame >> 16;
        frameLow = frame & 0xFFFF;
    
        IntMasterDisable();
        GPIOPinWrite(gyroHW->hwFSSBase,gyroHW->hwFSSPin,0);				// Lower CSB
        SSIDataPut(gyroHW->hwSSIBase, frameHigh);						// Sends only the upper 16 bits
        SysCtlDelay((SYSTEM_CLOCK_HZ/(3*7500000)));
        while(SSIBusy(gyroHW->hwSSIBase));							// Flush first 16 bits
        SSIDataGet(gyroHW->hwSSIBase, &readCrap);						// Read useless data
        SSIDataPut(gyroHW->hwSSIBase, (frameLow));						// This sends the other 16 bits
        SysCtlDelay((SYSTEM_CLOCK_HZ/(3*7500000)));
        while(SSIBusy(gyroHW->hwSSIBase));							// Flush second 16 bits
        GPIOPinWrite(gyroHW->hwFSSBase,gyroHW->hwFSSPin,gyroHW->hwFSSPin);		// Raise CSB
        SSIDataGet(gyroHW->hwSSIBase, &readCrap);						// Read useless data
        GPIOPinWrite(gyroHW->hwFSSBase,gyroHW->hwFSSPin,0);				// Lower CSB
        SSIDataPut(gyroHW->hwSSIBase, frameHigh);						// Flush third 16 bits
        SysCtlDelay((SYSTEM_CLOCK_HZ/(3*7500000)));
        while(SSIBusy(gyroHW->hwSSIBase));							// Wait for bits to be flushed out
        SSIDataGet(gyroHW->hwSSIBase, &read16High);						// Read 16 bits
        SSIDataPut(gyroHW->hwSSIBase, frameLow);						// Flush last 16 bits
        SysCtlDelay((SYSTEM_CLOCK_HZ/(3*7500000)));
        while(SSIBusy(gyroHW->hwSSIBase));							// Wait for bits to be flushed out
        SSIDataGet(gyroHW->hwSSIBase, &read16Low);						// Read more data
        GPIOPinWrite(gyroHW->hwFSSBase,gyroHW->hwFSSPin,gyroHW->hwFSSPin);		// Raise CSB
        IntMasterEnable();
    
        readReg =  (read16High << 16) | read16Low;
        memcpy(fullRegister, &readReg, 4);
    

    Hope this helps. If you can later collaborate with your Spansion results, that would be nice.

    Bruno