This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC4337 serial number

Hi, I'm trying to read the serial number of an LPC4337.
Here is my code but I'm not having much luck.
I have tried adding 1 to the entry point for Thumb instructions (as below) but that didn't work
Does anyone have any idea what could be going wrong?
Is there an address I can read directly?
Thanks

typedef void (*IAP)(void *, void *);
IAP IAP_entry = (IAP)0x10400101;
static uint32_t UID_array[4];

// get the 128-bit device serial number
// return 4 DWORDs into an array supplied by the caller
//
static uint32_t IAP_command = 58;

__disable_irq(); IAP_entry(&IAP_command, UID_array); __enable_irq();

Parents
  • Well my reading of the manual 0x10400100 is a Table, the first entry being the ADDRESS of the IAP_entry function, so you have to READ it, not jump to it directly.

    IAP IAP_entry = (IAP)*((uint32_t *)0x10400100);

    But you also have a debugger, you could step into things are see where they go.

Reply
  • Well my reading of the manual 0x10400100 is a Table, the first entry being the ADDRESS of the IAP_entry function, so you have to READ it, not jump to it directly.

    IAP IAP_entry = (IAP)*((uint32_t *)0x10400100);

    But you also have a debugger, you could step into things are see where they go.

Children
No data