Hi all.
When trying to call the function, the system hangs (LPC4357).
What am I doing wrong?
--------------------------------------------------------------------
#define IAP_ADDRESS (0x10400100UL)
uint32_t param_table[6];
uint32_t result_table[6];
void iap_entry(uint32_t param_tab[],uint32_t result_tab[])
{
void (*iap)(uint32_t [],uint32_t []);
iap = (void (*)(uint32_t [],uint32_t []))IAP_ADDRESS;
iap(param_tab,result_tab);
}
uint32_t blank_check(uint32_t flash_bank, uint32_t sector)
{
param_table[0] = 53; // BLANK_CHECK_SECTOR
param_table[1] = sector;
param_table[2] = sector;
param_table[3] = flash_bank;
__disable_irq();
iap_entry(param_table,result_table);
__enable_irq();
return (result_table[0]);
}
--------------------------------------------------------------------
Thanks.
<span class="short_text"><span class="hps">Found the</span> <span class="hps">answer</span> <span class="hps">here</span><span>: http://www.lpcware.com/zh-hans/content/forum/unable-get-iap-working-lpc1853</span></span>
<span class="short_text"><span>
</span></span>