AnsweredAssumed Answered

FLASH_LDD problem

Question asked by Michael David Gotesdyner on Oct 23, 2013
Latest reply on Oct 23, 2013 by ZhangJennie

Hello,

I'm using CW10.3 with PE, programming a MKL05Z32 chip.

I try to write and read the FLASH using FLASH_LDD module, but it doesn't seem to work. the clock speed I'm using is 21MHz (FEI mode).

I'm using a User area of 1024, and my write and read functions looks like this:

Erase:

FLASH1_Erase(FLASH1_DeviceData, FLASH_DATA_ADDRESS, 1024);

  do {

   FLASH1_Main(FLASH1_DeviceData);

   OpStatus = FLASH1_GetOperationStatus(FLASH1_DeviceData);

    } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

Read:

FLASH1_Read(FLASH1_DeviceData,FLASH_DATA_ADDRESS, array8, sizeof(array8));

  do {

  FLASH1_Main(FLASH1_DeviceData);

  OpStatus = FLASH1_GetOperationStatus(FLASH1_DeviceData);

  } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

Write:

FLASH1_Write(FLASH1_DeviceData,array8, FLASH_DATA_ADDRESS, sizeof(array8));

  do {

  FLASH1_Main(FLASH1_DeviceData);

  OpStatus = FLASH1_GetOperationStatus(FLASH1_DeviceData);

  } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

 

Please help,

Michael David

Outcomes