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.

LAUNCHXL-F28379D: C2000 SD card logging

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: BOOSTXL-DRV8305EVM,
Hi,
I am using Matlab/Simulink and F28379D Launchpad to control two SPMSM motor.
  • Hardware description  :      LAUNCHXL F28379D Launchpad  +  2  BOOSTXL-DRV8305EVM  +  2 Teknic 2310P SPMSM  + 24V,10A Regulated DC Power Supply
  • Program description    :      "mcb_pmsm_foc_sensorless_dyno_f28379d.slx"   and   "mcb_pmsm_foc_host_model_dyno_f28379d.slx"
  • I also came to know regarding MAT-file Logging on SD Card for Texas Instruments C2000 Processors and there is a reference application "c28x_matfile_logging.slx"

Now the point is that when Two BOOSTXL-DRV8305EVM are connected to the F28379D Launchpad, what about the SPI A, B and C pins of F28379D Launchpad.

Can I still log the Simulink Signals by accessing the SPI pins  of F28379D Launchpad through Bossterpack headers? 

Regards

Sankhadip

  • You can pull up the User's Guides for the BOOSTXL-DRV8305EVM and the LAUNCHXL-F28379D to determine what pins you have available and then use the F2837xD datasheet to see which of those pins can be used as SPI. I took a quick look at it just now and I'm guessing you'd need to use SPI A and SPI B to interface with each BoosterPack? So for SD SPI, you'd be left with SPI C, maybe on pins GPIO122 (SIMO), GPIO123 (SOMI), GPIO52 (CLK). You may need to use a GPIO to do a software controlled chip select though as I didn't see any available pins that could be configured as SPISTEC. Please double check this though--I'm not very familiar with this BoosterPack.

    I think alternatively you could use the same SOMI, SIMO, and CLK pins for both one of the BoosterPacks and the SD SPI, but then use two GPIOs to run separate software controlled chip selects for them.

    From a software standpoint, you said you'd be using Simulink generated code for doing the SPI communication to the SD card? Is that right? We'll need to reach out to MathWorks support for help if you have questions about that.

    Whitney

  • Hello,

    Thank you for your reply. 

    You mean I can only access the SPI A and SPI B pins through two different booster-pack. As there are two CPUs in F28379D Launchpad , one CPU is controlling one boostepack and the other CPU is controlling the other boosterpack. If SPI A pins are connected to one boosterpack then SPI B pins are connected to other booster pack. 

    1) So the point is that if  CPU1 is programmed  to log signals to one SD card then CPU2 should be programmed to log signals to other SD card. 

    2) SPI C pins can be used for dedicated SD card logging which is only possible for F28379D control card and not for  F28379D Launhpad.

    Am I right or wrong in the above two points? Please let me know.

    Waiting for your reply.

    Sankhadip

  • I assume you'll need to use SPI to configure the registers on the two BoosterPacks, correct? If you look at the pin mux options on the F2837xD pins that correspond to the SPI pins on the BoosterPacks, it looks like one BoosterPack is expected to connect to SPI A (through headers J1 and J2) and the other to SPI B (through headers J5 and J6).

    A single CPU should be capable of controlling both motors if you want. There's no limitation of which CPU can control which pins on the board either. You can assign them to either core.

    1) So the point is that if  CPU1 is programmed  to log signals to one SD card then CPU2 should be programmed to log signals to other SD card. 

    Why would you use two SD cards instead of one? Even if you wanted to log data from both CPUs, you could just use IPC or shared memory to pass data from one CPU to the that is handling the SD card communication.

    2) SPI C pins can be used for dedicated SD card logging which is only possible for F28379D control card and not for  F28379D Launhpad.

    The controlCARD does have an SD card slot on the board already, but if you buy a little SD Card breakout board, you should be able to wire it up to a LaunchPad.

    Whitney

  • Hello,

    Thank you for clearing my doubts. Now I will try to do it with hardware and I will get back to you in a couple of days.

    Sankhadip

  • Hello,

    In the mean time, I have tried to log signals of control algorithm under CPU1 through SPI A pins to a Micro SD card which is inserted into a SD card Breakout.

    The pin connection between SD card breakout and f28379d is shown in the figure below (Please enlarge the figure because I have written the PIN map in the figure)

    In the hardware configuration of the simulink file for the Target, I have enabled the sd card logging as shown below 

    When I am trying to start the application by connecting the Target through Simulink host file using USB interface(Rx,Tx), The host file is not running in real time and is very slow. And the motor is at standstill. 

    When I check for any data file in the SD card, nothing is found.

    Can you suggest what I am doing wrong....

    Waiting for your reply

    Thanks.

  • Hi Sankhadip,

    We are reaching out to MathWorks team to help on this. We should expect response in a day or two.

    Thanks & Regards,

    Santosh

  • Sankhadip,

    I had a call with MathWorks team today. The development team in MathWorks team is working on SD card issue, and will respond shortly.

    Thanks & Regards,

    Santosh

  • Hello Santosh Jha,

    Thanks a lot for your initiative on that issue.

    Regards

    Sankhadip.

  • Hi Santhosh,

    Please try following steps and let us know your response.

    1. Can you try to run the Motor control example without SD card logging and check if you are still facing the issues?
    2. Can you try to run the shipping example for SD Card logging without DRV and motor connected and check if you are able to log signals in SD card? Also checkout the troubleshooting page on SD card logging Memory and Signal Logging limitations on SD Card - MATLAB & Simulink (mathworks.com).
    3. Also which version of MATLAB are you using for this?

    Thanks,

    Aditya