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.

TMS320F28388D: SPI EEPROM example code does not begin to work

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

I'm trying to use an SPI FRAM (similar to SPI EEPROM, emulates the command set) on my TMS28388D, and  the example spi_ex6_eeprom does not appear to begin to work, in that we ask the FRAM chip for status in various SPI modes and it appears we get no response from the chip at all to readStatusRegister(RDSR).

In direct contrast, a valid status response is received from the chip if I proceed to bit bang the SPI interface as GPIOs.  What might I have missed?

  • Hi Eric,

    Ensure that you are utilizing C2000Ware 5.02.00, which is the latest version. The example was slightly modified in it.

    As this example was written to be used with an EEPROM, cross check the FRAM datasheet against the EEPROM datasheet for configurations, addressing, etc. While these two parts are similar, there may need to be some code changes to get it working. Here is an E2E thread that discusses using a FRAM with SPI:

    (+) TMS320F28388D: Extending FRAM through SPI

    Aishwarya

  • At this point, I have modified the example to simply ask for

    i=ReadStatusRegister(RDSR) as the first step after initialization; this should respond with 64.  Instead I get 255, which means the FRAM isn't responding at all, but I have no difficulty with the same operation when bit-banging.  This is a CY15B104QN-50SXI chip.

    It looks like I downloaded C2000ware 5.02.00 over 5.01.00 pretty recently, so how would I check the version of the example code I started with and driverlib, given that one of the modification steps was the 3 byte, most-significant byte first addressing?

  • Hi Eric,

    When you step through the code, do you see which functions are / are not working as expected, and what is happening on the registers? I am not too familiar with the FRAM to know exactly what the issue is on the FRAM side, if that is the case. Since we know bit banging works, it is most probably a configuration related issue. Refer to SysConfig for SPI configurations especially with the GPIOs.

    It looks like I downloaded C2000ware 5.02.00 over 5.01.00 pretty recently, so how would I check the version of the example code I started with and driverlib, given that one of the modification steps was the 3 byte, most-significant byte first addressing?

    The setchar length was removed from the polling transaction functions as well as some slight modifications in the example itself. It's also possible to open Example #6 from both C2000Wares to visually see the difference while developing your code.

    Aishwarya

  • I found the versions under "project/properties", select products tab.  The non-working example involves C2000Ware 5.2.0.00 and SysConfig 1.18.0. 

    When we step through it, it appears that nothing happens when we issue the "ID" command, that is the "readStatusRegister()" function fails.  When we step through it, either the SPI_transmitByte() or the SPI_receiveByte() function doesn't work as SPI_receiveByte() returns 0xFF whereas the bit-bang version returns 0x40.  I've got it set up as the first SPI function called after initialization, just before the enableWrite() function.

    How would I check the register write sequence?

  • Eric,

    The SPI_transmitByte() and SPI_receiveByte functions are using SPI_pollingFIFOTransaction() as per spi.h, so you should be able to step into these functions and check what is happening. I will also double check with the software experts if there is another recommended way to debug those functions. To confirm, have you checked to see that the physical connections such as WP are completed? Since the FRAM didn't seem to respond, I'm wondering if the enableWrite() function needs to be added back to enable the FRAM for writing.

    Best Regards,

    Aishwarya

  • Eric,

    Have you been able to resolve this issue? If there are no more questions, I will go ahead and close this thread  

    Best Regards,

    Aishwarya