IAP call

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

IAP call

636 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Yuriy on Thu May 23 02:42:41 MST 2013

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.

Labels (1)
0 Kudos
Reply
1 Reply

546 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Yuriy on Thu May 23 03:46:30 MST 2013

<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>

0 Kudos
Reply