AnsweredAssumed Answered

K60 flexNVM

Question asked by Bryan Olinger on Jul 16, 2012
Latest reply on Jul 17, 2012 by Bryan Olinger

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

Outcomes