SLAU320AJ July 2010 – May 2021
Switch CPU to stopped state (HaltCPU) | ||||
ClrTCLK | ||||
IR_SHIFT("IR_CNTRL_SIG_16BIT") | ||||
DR_SHIFT16(0x2408) | : Set RW to Write | |||
IR_SHIFT("IR_ADDR_16BIT") | ||||
DR_SHIFT16(0x0128)
(1) | : Point to FCTL1 Address | |||
IR_SHIFT("IR_DATA_TO_ADDR") | ||||
DR_SHIFT16(0xA502) | : Enable FLASH segment erase | |||
SetTCLK | ||||
ClrTCLK | ||||
IR_SHIFT("IR_ADDR_16BIT") | ||||
DR_SHIFT16(0x012A)
(1) | : Point to FCTL2 Address | |||
IR_SHIFT("IR_DATA_TO_ADDR") | ||||
DR_SHIFT16(0xA540) | : Source is MCLK, divider by 1 | |||
SetTCLK | ||||
ClrTCLK | ||||
IR_SHIFT("IR_ADDR_16BIT") | ||||
DR_SHIFT16(0x012C)
(1) | : Point to FCTL3 Address | |||
IR_SHIFT("IR_DATA_TO_ADDR") | ||||
DR_SHIFT16(0xA500)
(4) | : Clear FCTL3 Register | |||
SetTCLK | ||||
ClrTCLK | ||||
IR_SHIFT("IR_ADDR_16BIT") | ||||
DR_SHIFT16("EraseAddr")
(1) |
: Set Address for Erase
(2) | |||
IR_SHIFT("IR_DATA_TO_ADDR") | ||||
DR_SHIFT16(0x55AA) | : Write Dummy Data for Erase Start | |||
SetTCLK | ||||
ClrTCLK | ||||
IR_SHIFT("IR_CNTRL_SIG_16BIT") | ||||
DR_SHIFT16(0x2409) | : Set RW to Read | |||
SetTCLK | Repeat 4819 times (3) | |||
ClrTCLK | ||||
IR_SHIFT("IR_CNTRL_SIG_16BIT") | ||||
DR_SHIFT16(0x2408) | : Set RW to Write | |||
IR_SHIFT("IR_ADDR_16BIT") | ||||
DR_SHIFT16(0x0128)
(1) | : Point to FCTL1 Address | |||
IR_SHIFT("IR_DATA_TO_ADDR") | ||||
DR_SHIFT16(0xA500) | : Disable FLASH Erase | |||
SetTCLK | ||||
ClrTCLK | ||||
IR_SHIFT("IR_ADDR_16BIT") | ||||
DR_SHIFT16(0x012C)
(1) | : Point to FCTL3 Address | |||
IR_SHIFT("IR_DATA_TO_ADDR") | ||||
DR_SHIFT16(0xA510)
(4) | : Set LOCK bit in FCTL3 | |||
SetTCLK | ||||
ReleaseCPU should now be executed, returning the CPU to normal operation. |