Freescale K60DX256xxx10 FlexNVM/EEPROM partitioning using JLinkGDBServer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Freescale K60DX256xxx10 FlexNVM/EEPROM partitioning using JLinkGDBServer

Jump to solution
839 Views
nitinharish
Contributor V

Here is my JLINK GDB Server based GDB file running on Linux system :

target remote:2331

monitor halt

monitor flash device = MK60DX256xxx10

# Reset FSTAT Error Bits

monitor MemU8 0x40020000 = 0x70

# Let us go to FCCOB0 register (offset of 0x7) and select PROGRAM PARTITION COMMAND 0x80

monitor MemU8 0x40020007 = 0x80

# Let us go to FCCOB5 register (offset of 0xA) and select FLEXNVM_PARTITION COMMAND 0x03, Data Flash = 224 KB

monitor MemU8 0x4002000A = 0x03

# Let us go to FCCOB4 register (offset of 0xB) and select EEPROM_DATA_SET_SIZE COMMAND 0x32, EEPROM Backup Size = 32 KB

monitor MemU8 0x4002000B = 0x32

# Let us launch command sequence

monitor MemU8 0x40020000 = 0x80

# QUESTION: HOW CAN I VERIFY HERE THAT PARTITIONING IS SUCCESSFUL ? ? ?

monitor sleep 2000

monitor halt

monitor reset

# Load SREC

load og2_prod_1dot7dot2.srec

monitor halt

monitor reset

# I try to read back, but these registers which are EEPROM and FLASH partitioning codes are always 0

monitor MemU8 0x4002000A

monitor MemU8 0x4002000B

monitor halt

monitor regs

monitor reset

monitor go

quit

mjbcswitzerland​, bmwhui, ZhangJennie, igorpadykov, @soledad Thoughts ?

Labels (1)
0 Kudos
Reply
1 Solution
2 Replies
666 Views
nitinharish
Contributor V

All right here is the solution:

target remote:2331

monitor halt

monitor flash device = MK60DX256xxx10

# Reset FSTAT Error Bits

monitor MemU8 0x40020000 = 0x70

# Let us go to FCCOB0 register (offset of 0x7) and select PROGRAM PARTITION COMMAND 0x80

monitor MemU8 0x40020007 = 0x80

# Let us go to FCCOB5 register (offset of 0xA) and select FLEXNVM_PARTITION COMMAND 0x03, Data Flash = 224 KB

monitor MemU8 0x4002000A = 0x03

# Let us go to FCCOB4 register (offset of 0xB) and select EEPROM_DATA_SET_SIZE COMMAND 0x32, EEPROM Backup Size = 32 KB

monitor MemU8 0x4002000B = 0x32

# Let us launch command sequence

monitor MemU8 0x40020000 = 0x80

# Let us wait for FLASH controller to finish its job, give it 2 million years

monitor sleep 2000

#Let us restart K60

monitor reset

#Let us load REAL Main APP Code now

load og2_prod_1dot7dot2.srec

# Let us verify our change worked OR NOT from System Integration Module Register (SIM), K60 user manual Pg 314, Section 12.2.17

# Also See Table 29-4, page 657/1801 for valid values being 0x20300, where bits 16-19 are for EEPROM & bits 8-11 are DEPART

monitor MemU32 0x4004804C

#Let us restart K60

monitor reset

monitor go

#As Keira would say AAA DONE

quit

0 Kudos
Reply
667 Views
nitinharish
Contributor V
0 Kudos
Reply