Clear Filters
Clear Filters

I can't use SPI on F28M36 concerto C2000

2 views (last 30 days)
Hello all,
I am in trouble with the SPI of F28M36 in Simulink. I have a simple "code" :
When I deploy to hardware, nothing happen on the GPIO16 (SIMO) or even on the SPICLK.. I have a LSPCLK = SYSCLKOUT/4
Here is my SPI config :
With that configuration I have nothing on my board. I don't know what I can change to solve the problem on Simulink, so I began to check the generated code on CCS7 and I realize that the code is not compilable beacause there are some missing library. I have that error :
C:\MATLAB\spi_ert_rtw>cd .
C:\MATLAB\spi_ert_rtw>if "all" == "" ("C:\PROGRA~1\MATLAB\R2017b\bin\win64\gmake" -B -f all ) else ("C:\PROGRA~1\MATLAB\R2017b\bin\win64\gmake" -B -f all )
C:/PROGRA~3/MATLAB/SUPPOR~1/R2017b/3P778C~1.INS/TIC200~1.INS/TI-CGT~1.LTS/bin/cl2000 --compile_only --large_memory_model --silicon_version=28 --define="LARGE_MODEL" -i"/~SupportFiles/DSP280x_headers" -i"/~SupportFiles/DSP280x_headers/include" -i"C:/PROGRA~3/MATLAB/SUPPOR~1/R2017b/3P778C~1.INS/TIC200~1.INS/TI-CGT~1.LTS/include" -v28 -ml --float_support=fpu32 -DMODEL=spi -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DMW_PIL_SCIFIFOLEN=16 -DMW_PIL_TIC2000_CONCERTO -DSTACK_SIZE=512 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DMW_PIL_SCIFIFOLEN=16 -DMW_PIL_TIC2000_CONCERTO -DSTACK_SIZE=512 -DRT -DMODEL=spi -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -IC:/MATLAB -IC:/MATLAB/spi_ert_rtw -IC:/PROGRA~1/MATLAB/R2017b/extern/include -IC:/PROGRA~1/MATLAB/R2017b/simulink/include -IC:/PROGRA~1/MATLAB/R2017b/rtw/c/src -IC:/PROGRA~1/MATLAB/R2017b/rtw/c/src/ext_mode/common -IC:/PROGRA~1/MATLAB/R2017b/rtw/c/ert -IC:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/tic2000_concerto/src -IC:/PROGRA~1/MATLAB/R2017b/toolbox/target/extensions/processor/tic2000/include -IC:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/tic2000/inc -IC:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/tic2000/src -IC:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/tic2000_concerto/inc -IC:/ti/controlSUITE/device_support/f28m36x/v208/F28M36x_common/include -IC:/ti/controlSUITE/device_support/f28m36x/v208/F28M36x_headers/include --output_file=MW_c28xx_board.obj MW_c28xx_board.c
"C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/tic2000/inc/MW_c2000SPI.h", line 12: fatal error: cannot open source file "MW_SVD.h"
1 catastrophic error detected in the compilation of "MW_c28xx_board.c".
Compilation terminated.
>> Compilation failure
gmake: *** [MW_c28xx_board.obj] Error 1
C:\MATLAB\spi_ert_rtw>echo The make command returned an error of 2
The make command returned an error of 2
The MW_SPI.h is missing and I can't find it on my computer.. I have already uninstall/install ControlSuite,Matlab SupportPackage
Can someone please help me ?

Accepted Answer

Aditya Padmanabha
Aditya Padmanabha on 28 Nov 2017
Edited: Aditya Padmanabha on 28 Nov 2017
The SPI SIMO and CLK pins should have values at the pins even though you are not reading the SOMI data using SPI Receive. 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 pinmap. For example, pins on the Docking station 67, 69, 71, 73 corresponds to GPIO16, 17, 18, 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.
Loïc MICHEL on 28 Nov 2017
Hi Aditya,
Thanks for your answer ! I can't test your file right now but I'll tell you if it works.
Have a nice day !
Loïc MICHEL on 29 Nov 2017
It works with the new file !
Thank you !

Sign in to comment.

More Answers (1)

Venkatesh Chilapur
Venkatesh Chilapur on 23 Nov 2017
Could you please try to run the 'targetupdater' once and run through the complete setup process by pointing to CCSV, controlSuite path as required in the setup process. Please let us know if this helps.
Regards, Venkatesh C
  1 Comment
Loïc MICHEL on 24 Nov 2017
Hi, Thanks for your answer. I have already done that. I have done it again and nothing change.. That's weird, beacause I've already made a program with UART and other things and it goes well. The CCS version could be a problem ? MW_SPI.h should be in the SupportPackage library folder ?
Thank you for your help,

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!