---
title: "IAP Function call issue"
url: "https://maker.wiznet.io/forum/13639"
markdown_url: "https://maker.wiznet.io/forum/13639/md"
type: "Forum topic"
category: "MCU & Boards"
author: "joene335"
created: "2020-01-08T14:39:03+09:00"
last_activity: "2020-01-10T07:03:35+09:00"
language: "en"
views: 643
replies: 0
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# IAP Function call issue

## Question

Asked by joene335 on 2020-01-08 in MCU & Boards.

For a project i’m using a w7500p development board. For this project some data needs to be stored and remembered even when the power is down.

The problem persists that when i want to use the IAP-FLash function to read/write some data the application gets stuck in the nmi handler.

I’ve tried to change the the clock to the internal 8 Mhz clock as recommended in the errata data sheet.
Still this problem persists.

Anyone who can help solve this problem? I’m using the keil uvision interface to programm the w7500p.

This is the source code i’m adding to write data to the flash memory

uint8_t ip = 192;
CRG_FCLK_SourceSelect(CRG_RCLK);

FLASH_IAP(IAP_ERAS_SECT, IP_START_0, 0, 0 );
FLASH_IAP(IAP_PROG, IP_START_0, &ip, SECT_SIZE);

CRG_FCLK_SourceSelect(CRG_MCLK);

---

Source: https://maker.wiznet.io/forum/13639
