RL78/F13 FSL not working

I'm using FSL in the R5F10BGG and R5F10BGC micro-controllers. The MCU frequency is default 32MHz.

The FSL_Init() always returns 0x05, parameter error. Im using: __far fsl_descriptor_t fsl_descriptor_pstr = { 0x00, 0x20, 0x01 }; 

I treied a few other frequencies. None of them worked either.

  • The descriptor values look OK if you have Option Byte 000C2H set for internal 32MHZ clock

    Here are several items to check:
    1. review code examples on page 28 of FSL Users manual (R01US0016ED0105) to make sure the syntax for the descriptor is correct.

    2. Since you are using CAN MCU you may be using an external XTAL on X1/X2 pins and using the PLL to generate CAN frequencies from fMX. Make sure that fIH internal clock is still enabled when running the FSL library. If fIH is disabled, you can also get the 0x05 parameter error.

    3. Check the RL78 Self-RAM list of Flash Self-Programming Library for RL78 Family
    R20UT2944EJ0301
    and make sure you have the memory sections set correctly

    Regards,
    Mike
  • Hi vikkubaliga,

    Have you solved this issue already? Are you sure that the device is running on 32MHz? What other frequencies have you tried?

    JB
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    https://en-us.knowledgebase.renesas.com/

  • Thanks. It seems that the frequency was different. On changing it, the fsl_init works. Now i have a new problem. The program jumps to disassemble in some unknown location on executing the write command. The problem, now, is with setting the memory sections. I have no info on how and what sections to set.

    I have only this document : r01us0050ej0104_rl78.
    I'm using sample code, doc from this package downloaded from the renesas site : JP_R_FSL_RL78_T01_V2.21_B_E

    It would be helpful if i got these as mentioned in the solutions: R01US0016ED0105 , R20UT2944EJ0301
  • In reply to JB:

    Thanks. It seems that the frequency was different. On changing it, the fsl_init works. Now i have a new problem. The program jumps to disassemble in some unknown location on executing the write command. The problem, now, is with setting the memory sections. I have no info on how and what sections to set.

    I have only this document : r01us0050ej0104_rl78.
    I'm using sample code, doc from this package downloaded from the renesas site : JP_R_FSL_RL78_T01_V2.21_B_E

    It would be helpful if i got these as mentioned in the solutions: R01US0016ED0105 , R20UT2944EJ0301
  • In reply to Mike Clodfelter:

    Thanks. It seems that the frequency was different. On changing it, the fsl_init works. Now i have a new problem. The program jumps to disassemble in some unknown location on executing the write command. The problem, now, is with setting the memory sections. I have no info on how and what sections to set.

    I have only this document : r01us0050ej0104_rl78.
    I'm using sample code, doc from this package downloaded from the renesas site : JP_R_FSL_RL78_T01_V2.21_B_E

    It would be helpful if i got these as mentioned in the solutions: R01US0016ED0105 , R20UT2944EJ0301
  • In reply to vikkubaliga:

    Hi vikkubaliga
    I have same your issues when using SUB-FLS function (FSL_BlankCheck,FSL_Erase) .
    Are you already to fixed ?

    Thank you.