LPC55xx: read UID implementation.
* @brief
*
* DAPLink Interface Firmware
- * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
+ * Copyright (c) 2020 Arm Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* limitations under the License.
*/
-#include "fsl_device_registers.h"
+#include <string.h>
#include "read_uid.h"
+//! The RFC4122-compliant UUID resides in the Protected Flash Region.
+#define UUID_ADDR (0x0009FC70)
+
+#define UUID_LENGTH (16)
+
void read_unique_id(uint32_t *id)
{
-#ifdef LPC55_FIXME
- id[0] = SIM->UIDL;
- id[1] = SIM->UIDML;
- id[2] = SIM->UIDMH;
- id[3] = SIM->UIDH;
-#else
- id[0] = 0;
- id[1] = 0;
- id[2] = 0;
- id[3] = 0;
-#endif
+ memcpy(id, (void *)UUID_ADDR, UUID_LENGTH);
}
