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.

CCS/F28M36P53C2: SPI does not work on my card

Part Number: F28M36P53C2

Tool/software: Code Composer Studio

Hello all,

I am trying to make a SPI communication with Simulink and the F28M36. As you can imagine, it doesn't work. I have already made some code with Simulink to the card and everything works fine.

I only have trouble with SPI (till now). A strange thing is that the Simulink compiler works and deploy the "program" to the card (and there is nothing on the SPI pins). When I open the CCSv7 to see the generated code, I realize that there are some errors.

"spi.h", line 27: fatal error: cannot open source file "MW_SPI.h"
1 catastrophic error detected in the compilation of "MW_c28xx_board.c".

When I check on my computer, I don't have any MW_SPI.h.

Could you help me ?



  • Antoine,

    Just confirming that you are able to run you test without the SPI functions included, but once you include them, your program does not appear to run properly? Please make sure that you are including all of the proper files in your mathworks project.

    Additionally, Simulink is not a TI tool, and we will not have as much in-depth knowledge as to the internal workings of that tool. You may get a better reply directly from Mathworks. Please see this thread: There are some resources there that might help. I will reach out to the Mathworks team to look into this for you.

  • Hi,

    Please check on following things

    1) Ensure a known program is running on ARM core. You can create a simple model for ARM core and download before downloading the SPI model to c28x core.

    2) Ensure the download goes through properly without any warnings or errors.

    3) Are you using the ControlCard? Ensure the pins numbers you are checking are proper and corresponds to the GPIO number by checking the pin map. For example, pins on the ControlCard 22-25 (B Row) corresponds to GPIO16-19.

    4) If you want to debug in CCS. Use the project created after code generation to launch the CCS project directly and build in CCS (attached the image for reference). It will take care of all the dependencies required for the build including the shipped files like MW_SPI.h.

    Let us know if further help is needed.