Method 2: MCU Re-boots from ISP-memory through AP-memory
The alternative method to make the MCU boot from the ISP-memory is to trigger a software reset while the MCU
is running in the AP-memory. In this case, neither HWBS nor HWBS2 is enabled. The only way for the MCU to
boot from the ISP-memory is to trigger a software reset when running in the AP-memory. See the following flow
chart.
Figure 20-6. Re-boot from ISP-memory through AP-memory
When MCU is running
in the AP-memory
.
.
.
.
.
NO
Check if ISP is requested?
YES
ISPCR=ISPCR|0x40;
//SWBS=1, select software-boot from ISP-memory
ISPCR=ISPCR|0x20;
//SWRST=1, trigger software reset
MCU will re-boot from ISP-memory,
and run the "ISP code"
NO
Check if ISP is requested?
YES
See Figure 20-2
for the flow chart
ISPCR=ISPCR&0xBF;
Do Flash Page Erase
//SWBS=0,
//select software-boot from AP-memory
ISPCR=ISPCR|0x20;
See Figure 20-3
for the flow chart
//SWRST=1,
Do Flash Program
//trigger software reset to reboot from AP-memory
See Figure 20-4
for the flow chart
Do Flash Read to verify
the programmed data
MCU will re-boot from AP-memory,
and run the normal "Application code"
End
103
MPC82G516A Data Sheet
MEGAWIN