LPC54628 IAP erase page arguments – address or page?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC54628 IAP erase page arguments – address or page?

635 Views
bergem
Contributor II

I'm trying to erase pages from the flash using IAP commands. There is, however, a discrepancy between the user manual (UM10912 – Rev. 2.4 ) and the SDK v2.12.0.

The user manual states (page 68):

Table 82. IAP Erase page command

Input Command code: 59 (decimal)
Param0: Start flash address.
Param1: End flash address (should be greater than or equal to start address)
Param2: System Clock Frequency (CCLK) in kHz.

The parameters given are start and end address. While in fsl_iap.c, the IAP_ErasePage() takes start and end page:

status_t IAP_ErasePage(uint32_t startPage, uint32_t endPage, uint32_t systemCoreClock)
{
    uint32_t command[5] = {0x00U};
    uint32_t result[5] = {0x00U};

    command[0] = (uint32_t)kIapCmd_IAP_ErasePage;
    command[1] = startPage;
    command[2] = endPage;
#if !(defined(FSL_FEATURE_SYSCON_HAS_FLASH_REFERENCE_CLOCK) && FSL_FEATURE_SYSCON_HAS_FLASH_REFERENCE_CLOCK)
    command[3] = systemCoreClock / HZ_TO_KHZ_DIV;
#endif /* FSL_FEATURE_SYSCON_HAS_FLASH_REFERENCE_CLOCK */
    iap_entry(command, result);

    return translate_iap_status(result[0]);
}

So which is it? Addresses or pages?

Labels (1)
0 Kudos
Reply
1 Reply

623 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

Start and end page.

 

BR

Alice

0 Kudos
Reply