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/TMDSCNCD28379D: Flash works different from RAM

Part Number: TMDSCNCD28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

I use a TMDSCNCD28379D in power electronics application, but now I shout flash the code to finish the prototype, but the code isn't working on flash. The same code works very well on RAM.

  • Hi Luiz,

    You need to provide some more detail for someone to understand the issue and provide some suggestion. Also I hope you have looked into the flash based example in C2000Ware and check then on your setup to make sure those work fine.

    Regards,

    Vivek Singh

  • Vivek Singh said:

    Hi Luiz,

    You need to provide some more detail for someone to understand the issue and provide some suggestion. Also I hope you have looked into the flash based example in C2000Ware and check then on your setup to make sure those work fine.

    Regards,

    Vivek Singh

    Ok, 
    We developed a code to control a DC/AC power converter.
    When we are developing we only store the code on RAM and everything works fine. 
    Now we try to store the SAME code on FLASH and it didn't work properly, like the converter start but at certain point stop operation.
    we used a flash based exemple from C2000Ware and after store in flash we tested if is ok, and everything is OK. But, doesn't works.
    After this we store back on RAM and works fine, no trouble at all.
  • Luiz,

    With flash configuration if your application start fine but stop operation in between then you need to step through the code to debug this. All RAMs are '0' wait state memory but flash are not so there could be some timing issue. Also one quick thing to check is value of NMIFLG register after application stops the operation to see if there is any error.

    Regards,

    Vivek Singh

  • Vivek Singh said:

    With flash configuration if your application start fine but stop operation in between then you need to step through the code to debug this. All RAMs are '0' wait state memory but flash are not so there could be some timing issue. Also one quick thing to check is value of NMIFLG register after application stops the operation to see if there is any error.

    Sorry, but I didn't understand your statement : "All RAMs are '0' wait state memory but flash are not so there could be some timing issue."

  • Hi Luiz,

    What I mean is RAM accesses are always single cycle access but flash accesses are not hence that could cause issue if the application waits for certain event at specific time. To know the issue you have to step through the code and check.

    Regards,

    Vivek Singh

  • Hi Luiz,

    Were you able to root cause the issue by stepping through the code?

    Regards,

    Vivek Singh

  • Hope you were able to debug the issue further. If you have any further queries, please let us know. If not, please close this post.

    Vivek Singh

  • I haven't found the solution yet.

    But I've found some clue.

    When I build the project to the RAM (this time I uninstalled everything and installed again)  I received the following error:

    "error #10010: errors encountered during linking; "wind.out" not built"

    I identify this error as a memory limit, then I change my original 2837xD_RAM_lnk_cpu1.cmd for this one:

    PAGE 0 :

       /* BEGIN is used for the "boot to SARAM" bootloader mode   */

       BEGIN           : origin = 0x000000, length = 0x000002

       RAMM0           : origin = 0x000122, length = 0x0002DE

       RAMD0           : origin = 0x00B000, length = 0x000800

       RAMLS0          : origin = 0x008000, length = 0x002000

    //   RAMLS1          : origin = 0x008800, length = 0x000800

    //   RAMLS2      : origin = 0x009000, length = 0x000800

    //   RAMLS3      : origin = 0x009800, length = 0x000800

       RAMLS4      : origin = 0x00A000, length = 0x000800

    ...

    AND this times works on RAM, OK but when I try make the project to Flash the CCS didn't show any error, BUT the program didn't work. I did not change the  2837xD_FLASH_lnk_cpu1.cmd.


    Any help?

  • Luiz,

    Sorry, you need to step through the code in CCS to understand the issue.

    Regards,

    Vivek Singh

  • Hi Luiz,

    Were you able to step through the code to see which part of the code causing this issue?

    Vivek Singh

  • Hi,

    If your issue is resolved, please close the post.

    Regards,

    Vivek Singh

  • Yes, I am able to step thought the code. What we observed is that the code stop working in some part when we turned on the PID control (it is important to say that the code works smooth on RAM).

  • Do you have any more detail on the failure ? Also I am assuming you have checked that flash settings (e.g. wait state) are properly configured.

    Regards,

    Vivek Singh