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/CODECOMPOSER: Flash api libray path for f28379d

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: C2000WARE, CONTROLSUITE

Tool/software: Code Composer Studio

Hi all,

Working on f28335 bootloader porting into a f28379d, have small doubt on flash library.

Flash api libray of f28335 Flash28335_API_V210.lib can be replaced with  F021_API_F2837xD.lib for f28379d. Please can you confirm on this.

I could see two libraries in the below path, F021_API_F2837xD.lib and F021_API_F2837xD_FPU32.lib, what could be the difference of both.

ti\c2000\C2000Ware_1_00_01_00\libraries\flash_api\f2837xd\lib

Flash28335_API_V210.lib, here I think added the release no to library is it right?
ti\c2000\C2000Ware_1_00_01_00\libraries\flash_api\f2833x\28335\lib

Thanks

  • Hi all,

    I replaced the  Flash28335_API_V210.lib  by  F021_API_F2837xD.lib, then started giving bellow build errors,

    Please let me know  am in right direction, am started looking into to fix the below build issues in my application.

    *******************************************************************************************

    "../2837x_FLASH_lnk_cpu1.cmd", line 73: error #10265: no valid memory

      range(NULL) available for placement of "Flash28_API"

    "../2837x_FLASH_lnk_cpu1.cmd", line 73: error #10099-D: program will not fit

      into available memory.  run placement with alignment/blocking fails for

      section "Flash28_API" size 0x0 page 0

    undefined              first referenced

     symbol                    in file    

    ---------              ----------------

    _Flash28335_DepRecover ./flash.obj    

    _Flash28335_Erase      ./flash.obj    

    _Flash28335_Program    ./flash.obj    

    _Flash_CPUScaleFactor  ./flash.obj    

    *******************************************************************************************

    Thanks

  • Hi all,

    Referred both conrolsuite and c2000 ware did n't able find the equivalent methods of f28335 (Flash28335_DepRecover,Flash28335_Erase, Flash28335_Program, Flash_CPUScaleFactor ) for f28379d.

    ti\c2000\C2000Ware_1_00_01_00\libraries\flash_api\f2837xd

    ti\controlSUITE\device_support\F2837xD\v210\doc\FlashAPI_Doc\SPNU595.pdf

    Please let me know any comments on the above.

    Thanks
  • Hi all,

    As per the www.ti.com/.../spnu629.pdf, could able to find the equivalent methods for two apis,

    Flash28335_Erase = Fapi_issueAsyncCommandWithAddress()

    Flash28335_Program = Fapi_issueProgrammingCommand()

    What about Flash_CPUScaleFactor and Flash28335_DepRecover??
  • Hi Ashok,

    As you might have noticed in SPNU629, your application should specify the operating frequency as a parameter to the Fapi_initializeAPI() function. Hence, in F28379d device, you don't need to use Flash_CPUScaleFactor.

    Coming to DepRecover, the Flash technology used in F28379d prevents the depletion occurrence. Hence, there is no need for depletion recovery algorithm.

    Regarding the difference between F021_API_F2837xD.lib and F021_API_F2837xD_FPU32.lib: Please refer to section "2.3.2.2 Distribution Files" of SPNU629.

    Let me know if you have any questions.

    Thanks and regards,
    Vamsi
  • Hi Vamsi,

    Thanks for you are reply, I was busy working with other interfaces.

    Today started looking into flash prorgramming.

    Is there any specific reason the flash_programming examples are placed under dual folder?
    C:\ti\c2000\C2000Ware_1_00_01_00\device_support\f2837xd\examples\dual\flash_programming\cpu01

    Again under flash_programming cpu01 and cpu02 were there , any comments please.

    Thanks
  • Ashok,

    The example is under dual folder since Flash programming is applicable for both cores and they share the common pump.  

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    Please can you clarify on Fapi_issueProgrammingCommand() api EccBuffer, EccBufferSizeInBytes parameters, as long as will use omodes (Fapi_DataOnly, Fapi_AutoEccGeneration) the parameter values will be zero is it right?

    ********************************************
    oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)u32Index,
    Buffer+i,
    8,
    0,
    0,
    Fapi_DataOnly);
    ********************************************
    If we use other modes(Fapi_DataAndEcc,Fapi_EccOnly), user has to calculate the ecc parameters(using some algs like hamming etc) , same will be assigned to the above parameters,is it right?

    Thanks
  • Ashok,

    As mentioned in the second column of the "Table 7. Uses of Different Programming Modes" of SPNU629, parameters that you mentioned are used only for Fapi_DataAndEcc and Fapi_EccOnly modes. In other modes, they are not used. Hence, values does not matter - zeros are fine.

    If your application calculates ECC using the code running on the F2837xD MCU, you can use Fapi_calculateECC() function as mentioned in SPNU629. If your application needs to calculate ECC on a host machine, you can use the ECC calculation algorithm provided in Appendix E of SPNU629.

    Thanks and regards,
    Vamsi
  • Hi Vamsi,

    Thanks for you are reply.

    Simple example: Now am doing one use case, Using Fapi_doMarginRead() flash api library the data written in the flash say sector C, should able to send to the PC using serial console as a standalone project after powercycle the target, Hope it should work.

    Thanks

  • Ashok,

    As long as you program ECC, you should be able to read the Flash data using Fapi_doMarginRead() function.

    Thanks and regards,
    Vamsi
  • Hi Vamsi,

    I did n't understand below statement, please can you explain.

    ***********************************************

    As long as you program ECC, you should be able to read the Flash data using Fapi_doMarginRead() function.

    ***********************************************

     

    Fapi_doMarginRead(), is working as expected, Here is the code attached with this post ASHOK_read_flashapi.zip, if you have comments pls let me know.

  • Ashok,

    Reading your first post on Fapi_doMarginRead(), I thought you are asking a question on whether you will be able to read Flash using this function or not.  Hence, I mentioned that you should program ECC as well so that you won't get ECC errors when you use this function to read the Flash.

    Hope this clarifies.

    Thanks and regards,

    Vamsi