TWR-K60N512-KEIL Freescale Semiconductor, TWR-K60N512-KEIL Datasheet - Page 81

no-image

TWR-K60N512-KEIL

Manufacturer Part Number
TWR-K60N512-KEIL
Description
K60N512 Keil Tower Kit
Manufacturer
Freescale Semiconductor
Series
Kinetisr
Type
MCUr

Specifications of TWR-K60N512-KEIL

Rohs Compliant
YES
Contents
4 Boards, Documentation, DVD
Peak Reflow Compatible (260 C)
Yes
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
For Use With/related Products
Freescale Tower System, K60N512
8.1.2.2.1 Code Example and Explanation
The following example uses a device with 256KB of FlexNVM and 4KB of FlexRAM.
This example assumes the part is erased and that the flash memory clock gate control is
enabled in the system integration module (SIM). The default state in the SIM is flash
memory clock enabled.
For a complete list of EEPROM data size codes and FlexNVM Partition codes, please see
the device-specific reference manual.
In this example, the FlexNVM is configured to use all 256KB of available memory as
EEPROM backup memory. The available 4KB of FlexRAM are configured as EEPROM.
When configuring the FlexRAM for EEPROM 2 subsystems are created and any
FlexRAM not configured as EEPROM is unusable. The EEPROM data size code being
used is 0x32 which selects a size of subsystem A = subsystem B = 2 KB. The FlexNVM
partition code used is 0x08, representing the size of our data partition as 0 KB and the
size of the EEPROM backup memory as 256 KB. This creates 2 EEPROM subsystems
2KB in size with each subsystem being backed up by 128KB of EEPROM backup
memory.
Example Code:
/* Write the FCCOB registers */
FTFL_FCCOB0 = FTFL_FCCOB0_CCOBn(0x80);
FTFL_FCCOB1 = 0x00;
FTFL_FCCOB2 = 0x00;
FTFL_FCCOB3 = 0x00;
FTFL_FCCOB4 = 0x32;
FTFL_FCCOB5 = 0x08;
FTFL_FSTAT = FTFL_FSTAT_CCIF_MASK;
while(!(FTFL_FSTAT & FTFL_FSTAT_CCIF_MASK)) // Wait for command completion
Freescale Semiconductor
Table 8-1. Program partition command FCCOB requirements (continued)
FCCOB Number
3
4
5
Kinetis Quick Reference User Guide, Rev. 0, 11/2010
// Selects the PGMPART command
// Subsystem A and B are both 2 KB
// Data flash size = 0 KB
// EEPROM backup size = 256 KB
// Launch command sequence
EEPROM data size code
FlexNVM partition code
FCCOB Contents [7:0]
Not used
Chapter 8 Using the FlexMemory
81

Related parts for TWR-K60N512-KEIL