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.

TMS320F28069M: Issue with uploading MATLAB SIMULINK 2019a model to the F28069M

Part Number: TMS320F28069M
I made a simple Simulink model with a pulse generator and a digital output pin. However, when I download it to TI TMS320F28069M, I don't get a PWM on the oscilloscope. Also, I get a red border around the digital output block. The diagnostic viewer says the load and run were successful. I have attached the model, diagnostic viewer, solver, and oscilloscope pic. Please let me know where I'm going wrong with this.
  • Hi Aruj,

    It looks to me as if code has been properly generated and is running on the F28069M. I'm not sure what pins you are configured for in Simulink, and what pins you are measuring, but I'd double check them.

    Did you try one of the Example models we provide - does it run correctly? If yes, that verifies the SW toolchain is running correctly.

    Did you try running an example via CCS - does that run correctly?  If yes, that verifies the HW is functioning correctly.

    Cheers,

    -Brian

  • Hi Brian,

    I've double-checked the pin and I have the right pin connected. I've checked with CCS examples (LED blinking) and it works fine. 

    I've also tried running the generated code in code composer studio by choosing 'Open Project in Code Composer Studio' link Under the Code Composer Studio Project section in the Diagnostic Viewer and yet I am facing the same issue.

    Also, there's a red border around digital output block and the warning says "Usage of non-compliant blocks". Could it be anything to do with that??

    Do I need to create an Environment variable?? I am using CCS v9.1.0 and MATLAB 2019a on windows 10. If yes, can you please tell me how.

    Thanks,

    Aruj Khandelwal 

  • Well, R2019a doesn't "officially" support CCSv9, so that could be an issue. You can update to R2019b - we officially claim support for CCS9 in the newest release - as we've actually done proper testing on it. However, difference between CCS8 and CCS9 is not so big - and I don't think this is the problem, as it looks like the code generation + download is ok.

    I don't see any obvious missteps here - it is working, but not generating the signal. I don't believe you need an environment variable.

    For CCS, just open and connect directly to board with that tool (nothing from MathWorks running). See if you can download and run a TI example. This verifies the HW is operating correctly.

    If you think the MathWorks software is not working correctly, please contact MathWorks Tech Support, as they don't read these forums. they may ask for a copy of your model to analyze.

    Cheers,

    -Brian

  • hi Brian, 

    I ran a CCS example code for PWM and one for LED blinking without MatLab and theyre working fine. So I am not entirely sure where the issue is. 

    Please guide me on what should I do next. I need this to work urgently.

    Thanks,

    Aruj Khandelwal

  • Start by aligning your SW install: R2019a + CCSv8 or R2019b + CCSv9

    If that doesn't help - contact MW Tech Support via prior link, they will take care of you. 

    -b

  • Hi,

    Please can you look in to following items:

    1. Check the sample rate of the model. If it is too fast then try to slow it down and see if it makes any difference.

    2. Study the generated code for the block. Does it look correct for the GPIO register access?

    3. Try to use the constant block to set discrete state like 1 or 0 to see if that works to change the state of the pin from Simulink.

    4. Open one of our example model for F28069M and see if the blocks inside are showing identical warning? In that case you may have to re-install the support package.

    5. If nothing helps please contact our support.

  • Thanks Venkatesh,

    Keeping the sampling time as 1/10th of the PWM time period resolved the issue. I also installed Matlab 2109b and CCSv9 works fine with it.