mpc82g516a Megawin Technology, mpc82g516a Datasheet - Page 102

no-image

mpc82g516a

Manufacturer Part Number
mpc82g516a
Description
8-bit Microcontroller
Manufacturer
Megawin Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mpc82g516aE
Manufacturer:
MEGAWIN
Quantity:
1 200
Part Number:
mpc82g516aF
Manufacturer:
MEGAWIN
Quantity:
20 000
20.2.3 How to Implement In-System Programming
Before using the ISP function, the user should use a Universal Programmer, the “Megawin 8051 Writer” or the
“Megawin 8051 ICP Programmer” (see
(1) Properly configure an ISP-memory according to size of the ‘loader program’.
(2) Program the ‘loader program’ (hereafter called ‘ISP code’) into this configured ISP-memory.
As we have known, the purpose of the ISP code is to program both AP-memory and IAP-memory. Therefore,
MCU must boot from the ISP-memory in order to execute the ISP
In-System Programming according to how the MCU boots from the ISP-memory.
Method 1: MCU Directly Boots from ISP-memory at Power-up
To make the MCU directly boot from the ISP-memory when it is just powered on, the MCU’s hardware option
HWBS or HWBS2 must be enabled. Once HWBS or HWBS2 is enabled, the MCU will always boot from the ISP-
memory to execute the ISP code when it is just powered on. The first thing the ISP code should do is to check if
there is an ISP request. If there is no ISP requested, the ISP code should trigger a software reset to make the
MCU re-boot from the AP-memory to run the user’s application program. See the following flow chart.
Figure 20-5. Directly boot from ISP-memory (HWBS or HWBS2 is enabled)
MEGAWIN
See Figure 20-2
for the flow chart
See Figure 20-3
for the flow chart
See Figure 20-4
for the flow chart
MCU boots from ISP-memory,
and starts to run the "ISP code".
Check if ISP is requested?
Do Flash Read to verify
the programmed data
Do Flash Page Erase
Power on, or
Reset from RST-pin
Do Flash Program
End
YES
Section
MPC82G516A Data Sheet
20.4.1) to do the following configuration:
"Reset from RST-pin" is
only for enabled HWBS2.
ISPCR=ISPCR&0xBF;
ISPCR=ISPCR|0x20;
NO
//SWBS=0,
//select software-boot from AP-memory
//SWRST=1,
//trigger software reset to reboot from AP-memory
MCU will re-boot from AP-memory,
and run the normal "Application code"
code. There are two methods to implement
102
the

Related parts for mpc82g516a