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.

TMS320F28379D: External flash via SPI

Part Number: TMS320F28379D

Tool/software:

I'm trying to interface with an external flash device, Infineon S25FL512S, via SPI.

I've referred to both the S25FL512S datasheet (https://www.digikey.com/en/htmldatasheets/production/1207771/0/0/1/s25fl512s) and the TMS320F2837xD TRM SPI section 18.  However, all of my commands are returning all 0xFF.  I hooked a scope up to the LaunchPad's J5 pin 47 (which should map to GPIO65, for SPICLKB) and ground, and I see a clock signal going out.

I've created a simple project based on "spi_ex6_eeprom".  It has a main loop that sends an RDID command to the flash device to read its manufacturer and device identification.

I think I specified the proper SPI configuration settings:

    SPI_disableModule(SPIB_BASE);

    SPI_setConfig(SPIB_BASE, DEVICE_LSPCLK_FREQ, SPI_PROT_POL0PHA1,  // Rising edge with delay
                  SPI_MODE_CONTROLLER, 1000000, 8); // bitRate = 1 MHz
    SPI_setPTESignalPolarity(SPIB_BASE, SPI_PTE_ACTIVE_LOW);
    SPI_disableFIFO(SPIB_BASE);
    SPI_disableLoopback(SPIB_BASE);
    SPI_setEmulationMode(SPIB_BASE, SPI_EMULATION_STOP_MIDWAY);
    SPI_enableModule(SPIB_BASE);

And I've triple checked that the proper GPIO pins are connected on the LaunchPad:

GPIO63 = SPISIMOB = LaunchPad pin 55
GPIO64 = SPISOMIB = LaunchPad pin 54
GPIO65 = SPICLKB = LaunchPad pin 47
GPIO66 = SPISTEB = LaunchPad pin 59

(Including 3.3V and ground).

I'd appreciate any suggestions.

Thank you,

Diane

8836.ExternalFlash.zip

  • I found the problem.  The S25FL512S Reset# pin also had to be hooked up to a GPIO, and I had to pull that GPIO high.  I hooked that up to GPIO97 (LaunchPad pin 45) and everything's working now.

        // configure GPIO 97 for the RESET signal
        GPIO_setPinConfig(GPIO_97_GPIO97);
        GPIO_setPadConfig(97, GPIO_PIN_TYPE_STD);
        GPIO_setDirectionMode(97, GPIO_DIR_MODE_OUT);    // GPIOX = output
    
    ...
    
        // RESET signal
        GPIO_writePin(97, 1);