Update,
I switched to the KSDK flash driver. Now, I am following the MKL25_EEPROM_CW103.zip example.
I find that all the examples use a function called NormalDemo.
In the documentation: FSL_eNVM_FTFX_UM , I found a structure that needs to be set
typedef struct _ssd_config
{
uint32_t ftfxRegBase;
uint32_t PFlashBase;
uint32_t PFlashSize;
uint32_t DFlashBase;
uint32_t DFlashSize;
uint32_t EERAMBase;
uint32_t EEESize;
bool DebugEnable;
PCALLBACK CallBack;
} FLASH_SSD_CONFIG, *PFLASH_SSD_CONFIG;
under the NormalDemo.h I see how some of these parameters were set:
/* FTFL module base */
#define FTFx_REG_BASE 0x40020000
#define PFLASH_BLOCK_BASE 0x00000000
#define DEFLASH_BLOCK_BASE 0xFFFFFFFF
#define EERAM_BLOCK_BASE 0x14000000
#define PBLOCK_SIZE 0x00020000 /* 128 KB size */
#define EERAM_BLOCK_SIZE 0x00000000 /* 0 KB size */
#define PFLASH_OUT_OF_RANGE 0x00020000 /* out of Pflash range */
#define DFLASH_OUT_OF_RANGE 0x15000000 /* L2K does not have D-FLASH */
#define PFLASH_START_ADDR 0x00000000 /* PFlash start address */
#define DFLASH_START_ADDR DEFLASH_BLOCK_BASE /* DFlash start address */
#define EE_ENABLE 0x00
#define RAM_ENABLE 0xFF
#define PFLASH_IFR_ADDR 0x00000000
#define DFLASH_IFR_ADDR 0x00800000
My question is how do I know what values to populate? By the way, I am using the processor for
the FRDM-K64F evaluation board.
It seems that after that step, eeprom_demo is called from the main and that's were they test writing
to that particular area of RAM.
I need help with this, to understand how this works.
thank you,
Neil