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/TMS320F280200: Flash write issue

Part Number: TMS320F280200

Tool/software: Code Composer Studio

Hello,

          When i write to the flash of the microcontroller via visual basic then my program code got hang and a file is open indicating no source available for 0x3ff5f5. In debugging mode variable's value  change during the change of visual basic's scrollbar but during write operation of this value to flash program's code got hang and a .C file generate indicating no source available for 0x3ff5f5 . I also check via using software breakpoint then i found that software goes to this line                                                  Status = Flash_Erase(SECTORB,&FlashStatus); and but  unable to pass that do while loop.  

************************************* Main.C ************************************

Uint16 Status;
FLASH_ST FlashStatus;

do
{
    Status = Flash_Erase(SECTORB,&FlashStatus);
}
while (Status != 0);

**************************** Flash2802x_API_Library.h ***************************


#define   Flash_Erase(a,b) Flash2802x_Erase(a,b)
extern Uint16   Flash_Erase(Uint16 SectorMask, FLASH_ST *FEraseStat);


#define SECTORB (Uint16)0x0002

typedef struct {
Uint32 FirstFailAddr;
Uint16 ExpectedData;
Uint16 ActualData;
}FLASH_ST;

So, provide me the solution of this issue or  how i save a value to microcontroller's flash via visual basic. I use this link for flash operation - www.ti.com/.../sprb169.pdf.

  • Sharique,

    You shouldn't execute Flash_erase() function in a do while statement as it might put flash in depletion (because of repeated flash erase attempts on flash failure.

    Regards,

    Manoj

  • Sir,
    now i didn't execute Flash_erase () function in a do while statement, but my issue remains same and there is flash write error.
  • Sharique,

    Your device might already be in depletion. What is the value of Status variable when it fails?


    Regards,

    Manoj

  • Sir, value of status variables vary. In my code i use FLASHB to flash write operation and this FLASHB also contains some part of program code. There is no memory error in my code. when going to FLASH operation it's only reach to erase function & then got hang . Can you help me via team viewer, so that u can see my code how i've to do it and it's easy to understand what's going.
  • In my code flash write operation going well but there is an issue regarding to memory. uncomment all logics of code step by step to see till which point of memory Flash erase operation is compatible. Now a single line remains in my code to uncomment and it's EALLOW of initialize.c

    when comment this in initialize.c
    // EALLOW; then

    ************************ .map ************************
    name origin length used unused attr fill
    FLASHB 003f6000 00000b00 0000011f 000009e1 RWIX
    FLASHA 003f6b01 0000147f 0000132f 00000150 RWIX

    and flash write operation ------ OK


    now after uncomment that line

    ************************ .map ************************
    name origin length used unused attr fill
    FLASHB 003f6000 00000b00 0000011f 000009e1 RWIX
    FLASHA 003f6b01 0000147f 00001330 0000014f RWIX

    but flash write operation interrupted and hang during flash erase means a single byte increase in FLASHA Sector is something weed.

    now i didn't want to recomment that EALLOW; in initialize.C so i'm going to comment any logic from interrupt.c to reduce the memory consumption in FLASHA Sector


    now after commenting that logic in interrupt.c

    ************************ .map ************************
    name origin length used unused attr fill
    FLASHB 003f6000 00000b00 0000011f 000009e1 RWIX
    FLASHA 003f6b01 0000147f 00001322 0000015d RWIX

    flash write operation interrupted and hang during flash erase but why even there is more space in FLASHA Sector regarding to first case




    Again i comment that EALLOW in initialize.c
    ************************ .map ************************
    name origin length used unused attr fill
    FLASHB 003f6000 00000b00 0000011f 000009e1 RWIX
    FLASHA 003f6b01 0000147f 00001321 0000015e RWIX

    and flash write operation ------ OK

    So, i've any idea what's going this
  • Sorry, I didn't understand your last message as i don't have access to your source code. To understand whether this is flash problem (or) your code issue. Can you try erasing and programming flash using CCS flash plugin.

    -Manoj
  • I hope this issue is resolved. Can I close this thread?