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.

TMS320F280039C: SPI Slave Mode does not set interrupt on reception, even with example code

Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG, TMDSCNCD280039C

Hello,

I am using a TMS320F280039C control card with the TMS evaluation dock.

As a start, I imported the spi_ex4_external_loopback_fifo_interrupts project from C2000ware v4.1.0.0

I connected the pins to each other as listed in the top of the .c file. SPIA is set up as a spi slave to receive traffic from the SPIB master. I see SPIB sending data, but SPIA does not ever receive anything, or set an interrupt.

I checked the sys config and noticed that it configures one of the SPIB pins to pin 83, which is not pinned out on the EVM dock, so I moved it to pin 90 instead.

I've scoped every pin and notice that for some reason there is no SPI traffic. I see MOSI toggle once but nothing else moves. This is a default example project, so I do not understand why it does not work.

  • Valdez: Is GPIO configuration only thing you changed? If so, what pin functionality what it?

  • The highlighted line is the only change I made to sysconfig. From pin 83 to 96 (because 83 does not seem to be pinned out on the dock).

    However, that doesn't explain why I don't see nCS/STE toggle. Also, I tried putting a SPI controller onto the receiver side and send that data from a known-good SPI controller in the same SPI mode, and do not see any interrupts fire with longer words.

    Another change was required. I'm not sure if the C2000ware versions are incompatible, but the __error__ function definitions were incompatible with the definition in debug.h. Specifically the const char had to be changed to a char as the argument in order for the program to compile. 

    The exact error for a fresh install when you try to run any of the demo code is:

    "#148 declaration is incompatible with "void __error__(char *, uint32_t)" (declared at line 51 of "C:\TI\c2000\C2000Ware_4_01_00_00\driverlib\f28003x\driverlib\debug.h")"

    I rectify it by opening device/device.c and .h and changing the argument type from a const char to a char.

  • The problem has been found.

    For the pinout issue, I did not realize that the pinouts (MCU pin numbers) do not match the dock pin numberings.

    Pulling up the control card pinout PDF from C:\TI\c2000\C2000Ware_4_01_00_00\boards\controlCARDs\TMDSCNCD280039C, I was able to use the correct pinouts on the board and now see successful SPI communication

    For the compiling issue, it looks like my C2000ware had been semi corrupted somehow with an old version. I did a full uninstall, deleted the C:\TI\c2000 folder, restarted, then re-installed the latest C2000ware and now everything works as expected.

    I'm marking this issue as resolved.