Download Print this page

Renesas R8C/11 Application Note page 10

Hide thumbs Also See for R8C/11:

Advertisement

Adjusting the Frequency of the High-speed On-chip Oscillator Using a Commercial Frequency
4.2.6 EW1 Mode Exit Function
4.2.7 Flash Write Function
flash_byte_write(unsigned char *address, unsigned char data)
flash_address = address
Yes
REJ05B0471-0100Z/Rev.1.00
flash_close_ew1_mode()
fmr01 = 0
return
i = 0
i < 4?
Yes
*flash_address = 0x40
*flash_address = data
fmr00 = 0?
No
Full status check
chk_flash_status()
No error?
No
*flash_address = 0x50
i = i + 1
If the fmr01 bit is set to "0" (CPU rewrite mode disabled), the fmr11 bit is also
set to "0" (EW0 mode).
[Argument]
*address: Address to which the HR1 adjustment value is written
data: Write data (HR1 adjustment value)
No
Issue a program command.
Write 0x40 in the first bus cycle and data in
the second bus cycle.
Wait until the flash write operation finishes.
Yes
As a result of full status check, if an error occurred, issue a
status clear command.
July 2004
R8C/11, R8C/13 Group
return result
Page 10 of 21

Advertisement

loading

This manual is also suitable for:

R8c/13