1 /**************************************************************************/
4 Source: http://knowledgebase.nxp.com/showthread.php?t=1594
6 /**************************************************************************/
9 IAP_return_t iap_return
;
11 #define IAP_ADDRESS 0x1FFF1FF1
12 uint32_t param_table
[5];
14 /**************************************************************************/
16 Sends the IAP command and stores the result
18 /**************************************************************************/
19 void iap_entry(uint32_t param_tab
[], uint32_t result_tab
[])
21 void (*iap
)(uint32_t[], uint32_t[]);
22 iap
= (void (*)(uint32_t[], uint32_t[]))IAP_ADDRESS
;
23 iap(param_tab
,result_tab
);
26 /**************************************************************************/
28 Returns the CPU's unique 128-bit serial number (4 words long)
33 #include "core/iap/iap.h"
35 IAP_return_t iap_return;
36 iap_return = iapReadSerialNumber();
38 if (iap_return.ReturnCode == 0)
40 printf("Serial Number: %08X %08X %08X %08X %s",
49 /**************************************************************************/
50 IAP_return_t
iapReadSerialNumber(void)
52 // ToDo: Why does IAP sometime cause the application to halt when read???
53 param_table
[0] = IAP_CMD_READUID
;
54 iap_entry(param_table
,(uint32_t*)(&iap_return
));
This page took 0.058362 seconds and 5 git commands to generate.