Other Parts Discussed in Thread: CC3200
Hi all,
Today I am continuing to try to get a SPI Flash peripheral up and going with the CC3200. I cannot currently read in correct values from the external SPI Flash. Everything checks out when I watch the communication via a logic analyzer. The CC3200 sends the right sequence of bytes and the peripheral makes an appropriate response.I would expect the last byte read into "ulSpiBuf" be 0x19. Instead, the value read in stays at zero.
Here is my configuration for the SPI:
MAP_SPIConfigSetExpClk(GSPI_BASE, MAP_PRCMPeripheralClockGet(PRCM_GSPI), SPI_IF_BIT_RATE, SPI_MODE_SLAVE, SPI_SUB_MODE_0, (SPI_HW_CTRL_CS | SPI_4PIN_MODE | SPI_TURBO_OFF | SPI_CS_ACTIVEHIGH | SPI_WL_8));
And here is my series of calls to send the command to the SPI Flash:
//Write to pin 61, low GPIOPinWrite(GPIOA0_BASE, 0x40, 0); unsigned char c = 0x90; MAP_SPITransfer(GSPI_BASE, &c, &ulSpiBuf, 1, 0); unsigned char a = 0x00; MAP_SPITransfer(GSPI_BASE, &a, &ulSpiBuf, 1, 0); MAP_SPITransfer(GSPI_BASE, &a, &ulSpiBuf, 1, 0); MAP_SPITransfer(GSPI_BASE, &a, &ulSpiBuf, 1, 0); MAP_SPITransfer(GSPI_BASE, &a, &ulSpiBuf, 1, 0); MAP_SPITransfer(GSPI_BASE, &a, &ulSpiBuf, 1, 0); //Write to pin 61, high GPIOPinWrite(GPIOA0_BASE, 0x40, 0xFF);
Unfortunately I have not found any clear answers while searching around in the forums. Does any one have thoughts on what I might be missing, either in the configuration or implementation? Thanks for your time!
Best regards,
Eric