跳至主要內容
Knowledgebase
Home
Renesas Electronics Taiwan - Knowledgebase

Will an error return if flash self-programming for RL78 family MCUs?

Latest Updated:12/20/2013

Question:

Will an error be returned if a flash function of the flash self-programming library for the RL78 family MCUs (such as FSL_Erase or FSL_Write) is called without processing the required presettings (for example, by calling FSL_Init, FSL_Open, and FSL_PrepareFunctions)?

Answer:

Processing to check presetting of the library only becomes effective after the FSL_Init function is called.

If the FSL_Init function has not been executed, the flash-memory function will proceed before the execution environment for flash self-programming (such as securing/initializing the self-programming RAM and setting the CPU’s operating frequency) is prepared. This might lead to a program running out of control or to the generation of an internal reset because error processing by the library do not execute.

If the flash function is executed without execution of other presettings after FSL_Init is executed, this leads to abnormal termination and the flash function returns the value FSL_ERR_FLOW (0x1F).

Suitable Products
Flash Self Programming Libraries