Hello,
This is on custom hardware. I am not running an example code, bud I did copy paste the above code from the lpcxpresso54608_iap_flash SDK example from SDK 2.7.0.
The MCUXpresso example works on the dev board OM13092 LPCXpresso54608. I can not run the MCUXpresso example on my hardware.
My code does not work on the OM13092 dev board either. So I think it may be a peripheral setting issue like a clock or IAP setting.
I am using SEGGER Embedded Studio. I put the example code in my project and nothing seems to write to flash.
Below is some simpler code to help debug the issue. I also attached a GIF of me stepping through the debugger. You can see the 0x8000 memory view and the local variables. You can see the status returned is 0x00 and the 0x8000 memory is never changes.
Below is an image of address 0x00 of my application binary. So you can see ECRP values.

uint32_t systemCoreClock = CLOCK_GetCoreSysClkFreq();
OS_INT_DisableAll();
status_t status = IAP_PrepareSectorForWrite(1, 1);
status = IAP_EraseSector(1, 1, systemCoreClock);
status = IAP_PrepareSectorForWrite(1, 1);
status = IAP_CopyRamToFlash(0x8000, (uint32_t*)pSrc, 256, systemCoreClock);
__asm("NOP");