Download V850E2/ML4 - Renesas Electronics

Transcript
V850E2/ML4
6.7.4
Updating Program Code Using Flash Self Programming
with Asynchronous Serial Interface J (UARTJ)
Checksum Judgment of Reprogram Area
Figure 6.7 shows the Checksum Judgment of Reprogram Area.
check_sum_check
Read checksum judgment data
Ensure that the size does not excceed
4080 bytes (=4K bytes ? 16 bytes)
Write data size falls within
effective range?
Read the following data calculated at the time of last
activation (when data received) and stored in the last
16-byte area of reprogram area;
- Checksum data
- Write data (program code) size
No
Yes
Set start address of reprogram area
Read data (1 byte) in reprogram
area for calculation
No
Complete reading for
write data size?
Yes
Increment read address
of reprogram area
Calculation result matches
with checksum data?
No
Yes
return(RET_OK)
return(RET_ERR)
Figure 6.7 Checksum Judgment of Reprogram Area
R01AN1475EJ0100 Rev.1.00
Mar. 18, 2013
Page 38 of 63