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.

Sticky: MathWorks Solutions for C2000 MCU’s

Save design time and get into production faster with C2000 MCU’s with MathWorks solutions.

To begin you use MATLAB® and Simulink® to create and simulate your algorithms. Next you use Embedded Coder® to generate production code of your algorithms. Embedded Coder support for Texas Instruments C2000 includes:

        • Automated build and execution
        • Block libraries for on-chip and on-board peripherals such as ADC, digital I/O, ePWM, SPI, I2C, and more
        • Real-time parameter tuning and logging using external mode
        • Processor optimized code including DMC and IQMath libraries
        • Ability to perform processor-in-the-loop (PIL) tests with execution profiling
        • Examples for motor control and power conversion that run on TI C2000 hardware

You can also generate code that runs on the Control Law Accelerator (CLA), a co-processor available on select TI Delfino and Piccolo processors.


 

From within MATLAB you can access hardware support for Embedded Coder via the Add-On Explorer from the MATLAB toolstrip.

 


Search for C2000, and select to download and install free C2000 library blocks. You insert and configure the blocks, which include IO and various functions, in your Simulink model. Then you use Embedded Coder to generate production code of your algorithm and run it directly on your TI C2000 MCU. The library blocks include documentation, example models, and support C2000 Piccolo, Delfino, and Concerto families.


Note: Using Embedded Coder requires additional MathWorks software: MATLAB®, Simulink®, MATLAB Coder™, and Simulink Coder™.

You can also just generate production code of your algorithms which can be imported and integrated into an existing Code Composer Studio project.

--- ---

Here is more info including how-to videos and examples you can run with TI hardware kits:

 

    • Details and Examples:

      • C2000 Hardware Support webpages:

      • Delfino: F2833x, F2837xS, F2837xD, C2834x

      • Piccolo: F2802x, F2803x, F2805x, F2806x, F2807x, F28004x

      • Concerto: F28M35x, F28M36x (C28x + ARM Cortex M3)

      • Legacy: C280x, C281x, C2833x, F281x, F280x

      • C2000-Based Examples

         


Content Updated 2019-01-22

141 Replies

  • In reply to Brian McKay:

    Hi Brian,

    The embedded coder Addon package tail/free support for C2000 mcu is available, please confirm.
    Am using the R2017a trail version, tried to install the C2000 mcu, but it has trown error need to install the Embedded coder, which I am not able to install.

    Thanks
  • In reply to ashok kumar6:

    Hi Ashok,

    The MathWorks C2000 Support Package is a free download, but it does require Embedded Coder. It wont work or install without it. If you have a trial license, contact the sales rep that set up your trial and have them add the code generation products to your trial. You will need MATLAB Coder, Simulink Coder and Embedded Coder. Note: You cannot self-trial the code generation products at this time - you have to consult with your local MathWorks office (or Distributor) to get these products added to a trial.

    -Brian

    Brian McKay  |  Technical Marketing  |  www.mathworks.com

  • In reply to Brian McKay:

    Brian,
    Thanks for your help but I wasn't able to open it up since I'm using 2016b version. Is it possible to convert it down to lower versions?

    Thanks,

    --Kash

     

  • In reply to Khashayar olia:

    Hi Kash,

    Try this one - It's been saved in R2016b. Note that F28379  isn't "officially" supported in 16b, but the model should open and will probably work, we just didn't have F28379 in the drop down as that chip was launched after R2016b was published.

    /cfs-file/__key/communityserver-discussions-components-files/171/c28379Dpmsmfocdual_5F00_ert_5F00_cpu2_5F00_16b.zip

    Cheers,

    -Brian

    Brian McKay  |  Technical Marketing  |  www.mathworks.com

  • In reply to Brian McKay:

    Thanks for your help.

    But F28379D is supported in 2016b, as you've told me couple of months ago. I've done lots of test through 2016b and it does have F28379D in the drop down:

    --Kash

    --Kash

     

  • In reply to Khashayar olia:

    Hi Kash,

    True. Except the initial release of our C2000 Support Package for R2016b (September 2016) did NOT include the F28379 in the drop down. We updated the support package to add it after the release. If you ever see "Update" in your Add On-Explorer or Add-On Manager, go ahead and make that update - as we've probably done some sort of bug fix and re-released the Support Package.  

    -Brian

    Brian McKay  |  Technical Marketing  |  www.mathworks.com

  • In reply to Brian McKay:

    Brian,
    Thanks for your confirmation.

    Regards,

    --Kash

     

  • In reply to Brian McKay:

    How do i get the I2C blocks to do the following sequence?

    1. Send a Start Bit
    2. Send the Slave Address
    3. Get an Ack back from the Slave
    4. Send the Register Address
    5. Get an Ack Back from the Slave
    6. Send the Data byte
    7. Get an Ack back from the Slave
    8. Send a Stop Bit.

  • In reply to Jian Xing Quek:

    Hi Jian,

    This I2C question is way over my head; I don't know anything about the BNO055 or much about I2C comms. First step is to make sure you review all the documentation and example model we provide:

    http://www.mathworks.com/help/supportpkg/texasinstrumentsc2000/examples/using-the-i2c-bus-to-access-sensors.html

    http://www.mathworks.com/help/supportpkg/texasinstrumentsc2000/ug/c28xi2creceive.html

    http://www.mathworks.com/help/supportpkg/texasinstrumentsc2000/ug/c28xi2ctransmit.html

    http://www.mathworks.com/help/supportpkg/texasinstrumentsc2000/ug/coder-target-pane-texas-instruments-c2000-processors.html#bu1q36c

    If you still need assistance, the best option is to contact MathWorks Technical Support.

    Thanks,

    -Brian

    Brian McKay  |  Technical Marketing  |  www.mathworks.com

  • I am using MATLAB 2017a with the TI C2000 Embedded Coder Support Package. I use a dbc file to define the CAN Xmit & Rcv signals using the CAN Pack & Unpack blocks. According to the help:
    **Note CAN messages use the value of the Message identifier parameter in C28x CAN Transmit block for transmission even when you use the CAN Pack block to create the CAN message.**
    However the CAN frames transmitted are using the IDs from the CAN Pack Block, not the ID I have put in the CAN Xmit block. I am using a workspace variable to define the ID, (Message identifier field contains hex2dec(Status1_addr)) but it seems to be ignored by the CAN Xmit block in favor of the ID specified by the dbc file in the CAN Pack block.
    Am I missing something or is this a bug with these blocks?

    Thanks,
    Don

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.