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.

F28M36P63C2: FlashAPI example resets target

Part Number: F28M36P63C2
Other Parts Discussed in Thread: CONTROLSUITE

I am using the example flash_programming_m3 to understand the FlashAPI library. When run on my Concerto control card it continually resets the target and the flash is not written to. I have tried to step through the code but have not been successful in discovering where the issue is. All the status checks come back successful. (Fapi_Status_Success=0 ). It the very worse it should end up in one of the example_error functions but it does not. Any suggestions would be appreciated. 

Thanks

  • Regis,

    Did you get any warning when you compiled the project? If yes and if it is related to ramfuncs of driverlib.lib, you have to rebuild the driverlib and use the rebuilt library with the flash_programming_m3 example.

    Let me know once you try with the rebuilt driverlib library.

    Thanks and regards,
    Vamsi
  • I only get a warning:
    warning: creating output section "ramfuncs" without a SECTIONS specification
    Finished building target: flash_programming_m3.out

    I will try to rebuild driverlib and see if that helps.
  • Also I did find that setting the flash bank to anything other than zero returns an error properly.
    If set to FlashBank0 the target resets and continually restarts.


    // Fapi_setActiveFlashBank function sets the Flash bank and FMC
    // for further Flash operations to be performed on the bank
    oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);
    if(oReturnCheck != Fapi_Status_Success)
    {
    // Check Flash API documentation for possible errors
    Example_Error(oReturnCheck);
    }
  • Regis,

    Yes, the warning that you mentioned is the cause of the issue.
    Once you rebuild the driverlib library, make sure to use the rebuilt one.

    Good that you verified that an error is reported properly for non-Bank0 parameter.

    Thanks and regards,
    Vamsi
  • I created a new library project and included all files from MWare/driverlib. I removed the old driverlib.lib and added the new one to flash_programming_m3.(it is in my workspace) I am still getting the same error. I also excluded driverlib from the build and it did not give any additional errors.

    There are source files in the driverlib folder as well as the css/debug/ folder. What should be included in the build. Can you give an overview of what needs included in the library. I may not have the project setup correctly although it is a TI example.
    thanks for your help.
  • Regis,

    I did not create a new library project.  I simply imported the driverlib project in to CCS from MWare and recompiled it using compiler version 16.9.1.LTS.  While importing the project, I made sure to uncheck the "Copy project in to workspace" button so that the new compiled library will replace the old library at controlSUITE\device_support\f28m36x\v210\MWare\driverlib\ccs\Debug folder.

    After recompiling the driverlib, I refreshed the flash programming project and checked the date of driverlib library to make sure that the latest compiled library is pulled in to my flash programming project.  Then I rebuilt my flash programming project - no warnings/errors occurred.  I am able to successfully program/erase the flash using the project.

    If I use the old driverlib file, I do get the same issue as yours.  I filed a ticket internally to update the driverlib library when releasing the new device support files.

    Let me know if you want me to attach the driverlib library.

    Thanks and regards,
    Vamsi

  • Yes, if you can attach the drivelib.lib I would appreciate it. I will attempt your suggested method as well.
    Thanks.
  • I compiled as you have stated and am still having the same issue.
    My compiler is V15.12 and I am using Ubuntu.
  • There is an error in pbist.h macros have the same name.
    I corrected this on my system.

    #define PBIST_ALGO_TRXORR_G8 0x10000000 // 27 Triple Read XOR Read: C28 Self Test ROM1
    #define PBIST_ALGO_TRXORR_G8 0x20000000 // 28 Triple Read XOR Read: M3 Self Test ROM
  • Regis,

    Please try attached driverlib library and let me know how it goes.driverlib.lib

    Regarding the pbist.h macros: I will check with corresponding expert and file a ticket to fix it.  Thank you for bringing it to our attention.  Hope you are using the latest version.

    Thanks and regards,
    Vamsi

  • I have had some success with my Windows system. I will try the attached driverlib on my linux system.
    Also the TI-RTOS package is 2.16.01.14 (the latest for C2000) and it contained the duplicate macro definition.
  • Your attached version of driverlib.lib corrected my problem on my Linux system.
  • Regis,

    Glad that it helped. As I mentioned, I filed a ticket to release the updated driverlib.
    I am closing this thread.

    Thanks and regards,
    Vamsi
  • Can you give me any insight why my build of driverlib.lib doesn't work but yours does? Maybe compiler version since i'm using 15.12.3?
  • Regis

    Do you see any build errors when on Linux or just not working when running? I've only run this on windows, following the steps Vamsi mentioned previously and had no issues.

    Your compiler version is fine, that is what I used.

    Best regards
    Chris
  • I get the ramfunc warning. Replacing driverlib with Vamsis' version corrects this.
  • Regis

    If you're using a compiler newer than 15.9, then you shouldn't get the ramfunc warning. Please confirm that you did indeed change it.
    I also just tried on the Linux, I imported driverlib project and flash_programming_m3. Rebuilt with 15.12.3.LTS and I see no warning. Are you using the F28M36x v210 device support package?

    Best regards
    Chris
  • Thanks for your reply.
    I confirmed the compiler is 15.12.3.
    I am still a bit new to this, how would I determine the support package. I am using files from Mware V202a (if that helps)
  • Regis

    You can determine it either by the controlSUITE path or the manifest included.
    (Ex: C:\ti\controlSUITE\device_support\f28m36x\v210) <- this is v210 of the device support package.

    If you are using v202, then the MWare driverlib won't contain the updates to switch to using .TI.ramfunc section. Please switch to the latest files.

    Best regards
    Chris
  • The version is V208. I will upgrade to V210 and try again!
    Thanks for catching this.
  • That corrected the issue. I copied v210 but had to re-build it. Once I did that everything worked. Thanks again!