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.

CCS/INSTASPIN-BLDC: Save offset values in Flash of F208027F

Part Number: INSTASPIN-BLDC
Other Parts Discussed in Thread: C2000WARE, MOTORWARE

Tool/software: Code Composer Studio

We are able to run the bldc motor on our custom hardware using F28027F & instaspin.We now have to save the adc offest values to flash  just one during bootup.I couldn't find the document which tells how to use the boot ROM APIs for flash.

I have already included the 2802x_FlashAPI_BootROMSymbols_v2.01.lib in my project.

any help is appereciated.

 

  • Hi Abhi,

    Please refer to the Flash2802x_API_Quickstart guide in the C2000ware installation and let me know if you have any questions. Directory location below:

    C:\ti\c2000\C2000Ware_1_00_06_00\libraries\flash_api\f2802x\docs

    Best,
    Kevin
  • Kevin,
    We have to use method A .
    So we don't have to copy the code to SRAM and we don't also need to include the API_Config.h and API_Library.h files right? Instaspin project already has flash.c and flash.h files
    Do I need to do STEP 7 : Initialize the Flash_CPUScaleFactor?

    I am using this project
    C:\ti\motorware\motorware_1_01_00_16\sw\solutions\instaspin_foc\boards\drv8312kit_revD\f28x\f2802xF\projects\ccs5\lab10a
  • Hi Abhi,

    Yes you should still perform step 7. It's included in the API checklist in section 5. I'm not very familiar with this motorware example and the flash files included, I'll take a look at them later to see if they're very different than the flash library API files.

    There's a good example in C2000ware you can reference that uses the API from ROM (Has a from flash build config too, but defaults to ROM).

    Please take a look at it as it should answer a lot of questions along with the guide:

    C:\ti\c2000\C2000Ware_1_00_06_00\libraries\flash_api\f2802x\example_ccsv5

    Best,
    Kevin
  • Kevin,

    I saw the example file you gave.The project itself has 2 build configurations to build using ROM and SW_API. Motorware project lab10a doesn't have the linker command file Example_Flash28027_ROM_API.cmd.Do I need to modify my linker command fiIe? We have already modified the existing linker command file to make it work with elprotronic GANG programmer.We wilI need your help in adding flash in motorware example project.
  • Hi Abhi,

    I think you'll need the following from the SECTIONS portion of the linker command file:

       /* The Flash API functions can be grouped together as shown below.
          The defined symbols _Flash28_API_LoadStart, _Flash28_API_LoadEnd
          and _Flash28_API_RunStart are used to copy the API functions out
          of flash memory and into SARAM */
    
    /******************************************************************/
    /* For Piccolo B we dont need to copy the API from Flash as it is */
    /* present in BOOT ROM											  */
    /******************************************************************/
    /*   Flash28_API:
       {
            -lFlash2802x_API_V100a.lib(.text)
       }                   LOAD = FLASHD, 
                           RUN = PRAML0,  
                           LOAD_START(_Flash28_API_LoadStart),
                           LOAD_END(_Flash28_API_LoadEnd),
                           RUN_START(_Flash28_API_RunStart),
                           PAGE = 0
    */ 

    best,

    Kevin