Philips Semiconductors Preliminary data
XA-G49
XA 16-bit microcontroller family
64K Flash/2K RAM, watchdog, 2 UARTs
2001 Jun 27
16
In-Application Programming Method
Several Application Program Interface (API) calls are available for
use by an application program to permit selective erasing and
programming of FLASH sectors. All calls are made through a
common interface, PGM_MTP. The programming functions are
selected by setting up the microcontroller’s registers before making
a call to PGM_MTP at FFF0H. Results are returned in the registers.
The API calls are shown in Table 2.
Table 2. API calls
API CALL PARAMETER
PROGRAM DATA BYTE Input Parameters:
R0H = 02h or 92h
R6 = address of byte to program
R4L = byte to program
Return Parameter
R4L = 00 if pass, non-zero if fail
ERASE BLOCK Input Parameters:
R0H = 01h or 93h
R6H = block number in bits 7:5, bits 4:0 = ’0’
block 0 : R6H = 00h
block 1 : R6H = 20h
block 2 : R6H = 40h
block 3 : R6H = 80h
block 4 : R6H = C0h
R6L = 00h
Return Parameter
R4L = 00 if pass, non-zero if fail
ERASE BPC and
STATUS BYTE
Input Parameters:
R0H = 04h
Return Parameter
R4L = 00 if pass, non-zero if fail
PROGRAM SECURITY BIT Input Parameters:
R0H = 05h
R6H = 00h
R6L = 00h – security bit # 1 (inhibit writing to FLASH)
01h – security bit # 2 (inhibit FLASH verify)
02h – security bit # 3 (disable external memory)
Return Parameter
none
PROGRAM STATUS BYTE Input Parameters:
R0H = 06h
R6H = 00h
R6L = 00h – program status byte
R4L = status byte
Return Parameter
R4L = 00 if pass, non-zero if fail
NOTE: Only two bits of this Special Cell may be programmed at one time.
PROGRAM BPC high byte Input Parameters:
R0H = 06h
R6H = 00h
R6L = 01h – program BPC
R4L = BPC[15:8] (BPC[7:0] unchanged)
Return Parameter
R4L = 00 if pass, non-zero if fail
NOTE: Only two bits of this Special Cell may be programmed at one time.
READ DEVICE DATA Input Parameters:
R0H = 03h
R6 = address of byte to read
Return Parameter
R4L = value of byte read
READ MANUFACTURER ID Input Parameters:
R0H = 00h
R6H = 00h
R6L = 00h (manufacturer ID)
Return Parameter
R4L = value of byte read
Philips Semiconductors Preliminary data
XA-G49
XA 16-bit microcontroller family
64K Flash/2K RAM, watchdog, 2 UARTs
2001 Jun 27
17
API CALL PARAMETER
READ DEVICE ID # 1 Input Parameters:
R0H = 00h
R6H = 00h
R6L = 01h (device ID # 1)
Return Parameter
R4L = value of byte read
READ DEVICE ID # 2 Input Parameters:
R0H = 00h
R6H = 00h
R6L = 02h (device ID # 2)
Return Parameter
R4L = value of byte read
READ SECURITY BITS Input Parameters:
R0H = 07h
R6H = 00h
R6L = 00h (security bits)
Return Parameter
R4L = value of byte read R4L[3:1] = sb3, sb2, sb1
READ STATUS BYTE Input Parameters:
R0H = 07h
R6H = 00h
R6L = 01h (status byte)
Return Parameter
R4L = value of BPC[15:8]
READ BPC Input Parameters:
R0H = 07h
R6H = 00h
R6L = 02h (boot vector)
Return Parameter
R4L = value of byte read (high byte of Boot PC)
PROGRAM ALL ZERO Input Parameters:
R0H = 90h
R6H = block number in bits 7:5, bits 4:0 = ‘0’
block 0 : r6h = 00h
block 1 : r6h = 20h
block 2 : r6h = 40h
block 3 : r6h = 80h
block 4 : r6h = C0h
R6L = 00h
Return Parameters:
R4L = 00 if pass, non–zero if fail
ERASE CHIP Input Parameters:
R0H = 91h
R4L = 55h (after chip erase, return to caller)
= AAh (after chip erase, reset chip)
= others: error
Return Parameters:
R4L = 00 if pass, non–zero if fail
PROGRAM SPECIAL CELL Input Parameters:
R0H = 94h
R6 = special cell address
0000h: program BPSW[7:0]
0001h: program BPSW[15:8]
0002h: program BPC[7:0]
0003h: program BPC[15:8]
0004h: program status byte
000Ah: program security bit #1
000Ch: program security bit #2
000Eh: program security bit #3
R4L = byte value to program
Return Parameters:
R4L = 00 if pass, non–zero if fail
NOTE: Only two bits of these Special Cells may be programmed at one time.
Philips Semiconductors Preliminary data
XA-G49
XA 16-bit microcontroller family
64K Flash/2K RAM, watchdog, 2 UARTs
2001 Jun 27
18
API CALL PARAMETER
ERASE SPECIAL CELL Input Parameters:
R0H = 95h
R6 = special cell address
0000h: erase BPSW[7:0]
0001h: erase BPSW[15:8]
0002h: erase BPC[7:0]
0003h: erase BPC[15:8]
0004h: erase status byte
Return Parameters:
R4L = 00 if pass, non–zero if fail
READ SPECIAL CELL Input Parameters:
R0H = 96h
R6 = special cell address
0000h: read BPSW[7:0]
0001h: read BPSW[15:8]
0002h: read BPC[7:0]
0003h: read BPC[15:8]
0004h: read status byte
0006h: read manufacturer ID
0007h: read device ID #1
0008h: read device ID #2
000Ah: read security bit #1
000Ch: read security bit #2
000Eh: read security bit #3
Return Parameters:
R4L = value of byte read
Security
The security feature protects against software piracy and prevents the contents of the Flash from being read. The Security Lock bits are located
in Flash. The XA-G49 has 3 programmable security lock bits that will provide different levels of protection for the on-chip code and data (see
Table 3).
Table 3.
SECURITY LOCK BITS
1
PROTECTION DESCRIPTION
Level SB1 SB2 SB3
PROTECTION
DESCRIPTION
1 0 0 0 No program security features enabled.
2 1 0 0 Same as level 1, plus block erase is disabled. Erase or programming of the status byte or
boot vector is disabled.
3 1 1 0 Same as level 2, plus program verification is disabled
4 1 1 1 Same as level 3, plus external execution is disabled.
NOTE:
1. Any other combination of the Lock bits is not defined.
2. Security bits are independent of each other. Full-chip erase may be performed regardless of the states of the security bits.
3. Setting LB doesn’t prevent programming of unprogrammed bits.

PXAG49KBBD/00,557

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
IC MCU 16BIT 64KB FLASH 44LQFP
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet