I am having an issue running the "flexmem" demo. I am unclear why it hangs where indicated below.
Here are the details:
* K60 Tower board (TWR-K60N512). It has mask 0M33Z silicon. The only errata that appears to pertain is errata ID 2592. However, the example code takes that into account.
* Using IAR tools (ver 6.4). It uses the same flexmem demo that come with CodeWarrior 10.2 (Freescale\CW MCU 10.2\MCU\CodeWarrior Examples\K40\flexmem) There isn't a flexmem example in the K60 directory.
void main (void)
{
char ch;
uint32 timeout;
SCB_SHCSR|=SCB_SHCSR_BUSFAULTENA_MASK|SCB_SHCSR_MEMFAULTENA_MASK|SCB_SHCSR_USGFAULTENA_MASK;
printf("\nRunning FlexMem demo!!\n");
/* Partition the memory to enable FlexMem mode */
if ( partition_flash( EEPROM_16_16, DFLASH_SIZE_128) )
{
/* Device has been partitioned for the first time, so this
* means the counters have not been initialized yet. We'll
* zero them out now.
*/
*((uint32 *)(LONGWORD_COUNTER_ADDR)) = 0x0;
/* Wait for the command to complete */
while(!(FTFL_FCNFG & FTFL_FCNFG_EEERDY_MASK)); <<<<<hangs here
Solved! Go to Solution.
The K60 MCU on the TWR-K60N512 doesn't have any NVM. It's a flash only part. The N in the K60 part number signifies a flash only part. You would need an X in that position to signify a part with NVM.
The K60 MCU on the TWR-K60N512 doesn't have any NVM. It's a flash only part. The N in the K60 part number signifies a flash only part. You would need an X in that position to signify a part with NVM.
Thanks. I discovered that fact after already posting.