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.

TMS320F28335: Accessing Flash using S-Function TMS320F28335

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

Hi,

I'm working on code generation using Matlab 2018b + Code Composer V6, I generate code using ert.tlc on C2000 TMS320F28335 target and I experience issues regarding accessing the flash during execution on my target.

In my Simulink model, I have a S-Function named "Ecriture_FLASH" with an associated .tlc file, this function uses the Flash_Erase and Flash_Program base functions and is dedicated to writing 16 bytes into Flash Sector H when calling the calibration mode. My model has several interfaces like I2C communication, PWM output, QEP input and so on, the model builds well and real-time execution on the target is OK, until I call the calibration mode.

When I enter this mode, I lose the communication, my target doesn't respond anymore. I checked that it was caused by Flash_Erase and Flash_Program specifically.

Previously I built this model using Matlab 2013a (with idelink.tlc) + Code Composer V5.5 and everything worked fine, I could access the flash without losing my system.

Is there any incompatibility between Matlab 2018, Code Composer V6 and the flash libraries of the F28335 ?

When I build my model, I get warnings about Flash28335_API_V210.lib like "build attribute vendor section TI missing in Flash28335_API_V210.lib<....obj>, compatibility cannot be determined" which I didn't have on Matlab 2013 + CCS V5.5. Or is it a problem regarding the linker ? I don't know where to look at.

Thank you for your help,

Best regards,

François

  • François,

    Thanks for reaching out to the TI E2E forums.  I'm going to ask the MW team to take a look at this post in parallel to me.

    The flash API version is the most current for this device, so that is not the issue.  I'm investigating internally about the warning from CCS(I've seen it as well), I don't believe there is any real issue here, but some change in what CCS looks for and the F28335 Flash API library was finalized prior to this change.

    Based on the behavior you describe it sounds like the Watchdog is not getting disabled in the MW routine in the newer version of the tool you have.  The flash erase time on this device can vary anywhere from 2 - 15s according to the DS.  We recommend the WD be disabled during all flash erase/programming activities to avoid it timing out and issuing a reset to the device.

    Another alternative is if the MW code has its own health checks, the flash API calls are not interruptible, so perhaps that could be timing out.  Is it possible to look inside those routines for any time out counter in Simulink that you could modify?

    We will need MW to comment if there has been a change in the MW routine from version 2013 to 2018.

    Best,

    Matthew 

  • Francois,

    You may try to install the latest version of the toolchain. The below is the verified toolchain version for R2018b:

    TI Code Composer Studio v8 and TI C2000Ware 1.00.05.00


    If the issue is not resolved, it would be best for you to get in touch with our support channel as we need to understand the issue in depth to resolve the errors.
    When we have a support ticket, we will immediately get in touch with you to understand the case in more detailed way.

    Please connect to us at:
    https://www.mathworks.com/support.html

    Best Regards,
    Ram Alla | MathWorks