C8051T322-GQR Silicon Labs, C8051T322-GQR Datasheet - Page 108

no-image

C8051T322-GQR

Manufacturer Part Number
C8051T322-GQR
Description
8-bit Microcontrollers - MCU USB-OTP-16K-LQFP32
Manufacturer
Silicon Labs
Datasheet

Specifications of C8051T322-GQR

Rohs
yes
Core
8051
Processor Series
C8051
Data Bus Width
8 bit

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
C8051T322-GQR
Manufacturer:
Silicon Laboratories Inc
Quantity:
10 000
C8051T620/621/320/321/322/323
18.1.2. EPROM In-Application Programming
The EPROM of the C8051T620/621/320/321/322/323 devices has an In-Application Programming option.
In-Application Programming will be much slower than normal programming where the V
programming
PP
voltage is applied to the V
pin, but it allows a small number of bytes to be programmed anywhere in the
PP
non-reserved areas of the EPROM. In order to use this option, V
must be within a specific range and a
IO
capacitor must be connected externally to the V
pin. Refer to Section “7. Electrical Characteristics” on
PP
page 33 for the acceptable range of values for V
and the capacitor on the V
pin.
IO
PP
Bytes in the EPROM memory must be written one byte at a time. An EPROM write will be performed after
each MOVX write instruction. The recommended procedure for writing to the EPROM is as follows:
1. Disable interrupts.
2. Change the core clock to 25 MHz or less.
3. Enable the VDD Monitor. Write 0x80 to VDM0CN.
4. Enable the VDD Monitor as a reset source. Write 0x02 to RSTSRC.
5. Disable the Prefetch engine. Write 0x00 to the PFE0CN register.
6. Set the VPP Pin to an open-drain configuration, with a ‘1’ in the port latch.
7. Set the PSWE bit (register PSCTL).
8. Write the first key code to MEMKEY: 0xA5.
9. Write the second key code to MEMKEY: 0xF1.
10.Enable in-application programming. Write 0x80 to the IAPCN register.
11. Using a MOVX write instruction, write a single data byte to the desired location.
12.Disable in-application EPROM programming. Write 0x00 to the IAPCN register.
13.Clear the PSWE bit.
14.Re-enable the Prefetch engine. Write 0x20 to the PFE0CN register.
15.Delay for at least 1 us.
16.Disable the programming hardware. Write 0x40 to the IAPCN register.
17.Restore the core clock (if changed in Step 2)
18.Re-enable interrupts.
Steps 8–11 must be repeated for each byte to be written.
When an application uses the In-Application Programming feature, the V
pin must be set to open-drain
PP
mode, with a ‘1’ in the port latch. The pin can still be used a as a general-purpose I/O pin if the program-
ming circuitry of the pin is disabled after all writes are completed by using the IAPHWD bit in the IAPCN
register (IAPCN.6). It is not necessary to disable the programming hardware if the In-Application Program-
ming feature has not been used.
Important Note: Software should delay for at least 1 µs after the last EPROM write before setting the
IAPHWD bit.
108
Rev. 1.1

Related parts for C8051T322-GQR