RL78/G13 R5F100ACA FDL problem

I completed my code using R5f100ACA and i am using FDL library and Store Data In two different memory Block..

Block 0==>One time Setting Data..i.e.Role Diameter Only One time or may be sometime when need to change Roll in Rolling Machine.When Power is On.

Block 1==>Data that which is change  i.e. Production in meter Only During Power is Off(USING built in LVD interrupt.)

Now problem is that the data is successfully stored and instrument working Properly 10 out of 1 with same code but with different 20 ic Some are not functioning means not writing in FDL..Uptill Now i found 5 to 6 fault ics.

some of them get working properly when i add offset means..

1)Not working Properly with offset=0;

mem_offset=0;

write_byte(addr+mem_offset);

 

2)working Properly with offset=50;

mem_offset=0;

write_byte(addr+mem_offset);

 

 

but in some case only so what is problem i purchase ic from renesas officially.So what problem is there hardware or Software..

  • Are you using a battery or capacitor backup to write after loss of power? Have you ensured that you have enough charge to write the full set of data?

    How often do you write the changing set of data?
  • In reply to Scott Winder:

    Right now i am using Capacitor Backup ...and ya it is provide enough backup time because it is successfully write down the contain but i feel you didn't understand my problem it is not when power off but it is time when chip is first time programmed or memory is first time written when power is on.
  • In reply to shllu:

    Are you doing a blank check and/or erase prior to the write?
  • In reply to Scott Winder:

    i am using FDL library Type 4...which has inbuilt function to blank check...

     

    uint8_t R_FDL_ExecuteWrite(void)
    {
    uint8_t ret;
    /* LED0 on */
    R_FDL_Init(); /* FDL initialization */
    ret = R_FDL_BlankCheck(); /* Blank check process */
    //ret= PFDL_OK;
    /* **** When blank check error **** */
    if(ret == PFDL_ERR_MARGIN)
    {
    ret = R_FDL_Erase(); /* Erase data of target block */
    }
    /* **** When other than blank check error **** */
    else
    {
    /* Do nothing */
    }

    /* **** When blank check or success data erase is success **** */
    if(ret == PFDL_OK)
    {
    ret = R_FDL_Write(); /* Write data process */
    /* ==== When write data is success ==== */
    if(ret == PFDL_OK)
    {
    ret = R_FDL_Verify(); /* Internal verify process */
    /* ---- When internal verify process is success ---- */
    if(ret == PFDL_OK)
    {
    R_FDL_Read(); /* Read data process */
    /* ---- When equal g_write_value and g_read_value ---- */
    if(g_write_value == g_read_value)
    {
    /* Do nothing */
    }
    /* ---- When different g_write_value and g_read_value ---- */
    else
    {
    ret = PFDL_NG;
    }
    }
    /* ---- When internal verify process is failure---- */
    else
    {
    ret = PFDL_NG;
    }
    }
    /* ==== When writing data is failure ==== */
    else
    {
    ret = PFDL_NG;
    }
    }
    /* **** When blank check or data erase is failure **** */
    else
    {
    ret = PFDL_NG;
    }

    PFDL_Close(); /* Close FDL */
    /* LED0 off */
    return ret;
    }

  • In reply to shllu:

    How do you distinguish between a PFDL_NG in the case of a failed blank check or erase vs. PFDL_NG in the case of a bad write? It seems things could fail at any point in the process and result in the same error.

    Have you looked at the dataflash in the debugger after a failed write?
  • In reply to Scott Winder:

    All memory contains became 0xFF....but it is happens when i am starting to write from location 1 or any others upto 50...but when i set offset mention earlier 200..all contains write properly without single fail...what is the reason behind this..?

    second thing is there any polling method function when memory write is 100% successful no need to check..
  • In reply to shllu:

    Have you determined exactly where in your code the error is coming from? For instance, if the blank check returns anything other than OK or ERR_MARGIN, you'll drop to the bottom with the same error as everywhere else.
  • In reply to Scott Winder:

    No it is not determined from where error is coming because in same code...if i started memory writing not from location 1 instead of location 80 or any other above 50 then same code works fine....so it is hard to find out error source.
  • In reply to shllu:

    It's important to find out exactly where in the code the failure is happening in order to narrow down possible causes. It is very unlikely that multiple parts will be defective in a manner that would cause what you are seeing, but it's possible that they have some attributes (still within specifications) that differ from those that work as expected.

    Have you run the sample code associated with R01AN1362EJ0120 (modified to work with your board) to see if it works on the devices that are having problems?
  • In reply to Scott Winder:

    ;***********************************************************
    ; Redefined RAM area
    ;***********************************************************
    ; ----------------------------------------------------------
    ; Redefined default data segment RAM
    ; ----------------------------------------------------------
    MEMORY RAM:( 0FF700H, 071FH )
    ; ----------------------------------------------------------
    ; Define new memory entry for saddr area
    ; ----------------------------------------------------------
    MEMORY RAM_SADDR : ( 0FFE20H, 0001E0H )




    Can this make problem....?it is different from from mentioned in R01AN1362EJ0120 .
  • In reply to shllu:

    The memory segments should be defined in accordance with the memory map of your device--the one in the app note is specific to the device being used in the example. So having a difference between yours and the example is not necessarily a problem.
  • In reply to shllu:

    shllu,

    Is your problem resolved?

    Mike Clements
    RenesasRulz Moderator
  • In reply to Mike Clements:

    NO my Problem is Not solve Still,
    I have those ICs which is not working if you want it then i can give it to you...to find out if it is part problem or something else in FDL block.