Reading UID on LPC54101J512

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

Reading UID on LPC54101J512

329 Views
mimers19
Contributor I

I am working on automating the programming of the LPC54101J512 microcontroller (as mentioned in the title above) and I'm facing a specific issue - I can't read the processor's serial number (UID). My goal is to do this using the factory-loaded Bootloader and IAP commands through ISP (USART). I have followed all the instructions described in the datasheet and the user manual for this microcontroller. Later, I found another document detailing errors and it mentioned that the UID cannot be read using a specially crafted command because it does not work. The suggested workaround was to read certain memory cells, but if any data is read at all, it certainly isn't the correct data. I am writing my program in C# and using a USB->COM converter.

0 Kudos
4 Replies

300 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hello mimers19 

As you may know, ReadUID is not implementable on LPC5410x and the workaround is provided in Errata

https://www.nxp.com.cn/docs/en/errata/ES_LPC5410X.pdf

ZhangJennie_0-1707799654781.png

If we need part UID we have to read  0x01800100 to  0x0180010C with code. Be careful not misread.  Besides we don't have other workaround.

Best Regards,

Jun Zhang

0 Kudos

262 Views
mimers19
Contributor I
Perhaps I wasn't clear enough previously. I attempted to read a memory address, but the communication unfolded as follows:

PC: ?
MCU: Synchronized<CR><LF>
MCU: Synchronized<CR><LF>
PC: U 23130<CR><LF>
MCU: OK<CR><LF>
MCU: U 23130<CR><LF>
PC: R 01800100 16<CR><LF>
MCU: OK<CR><LF>
MCU: R 01800100 16<CR><LF>
MCU: 14<CR><LF>

Could you help me understand what I'm doing wrong?
0 Kudos

281 Views
mimers19
Contributor I
I've read that implementing ReadUID is not feasible, and that I need to read from specific address locations. However, can I accomplish this using IAP commands, or must I do it through code that I upload to the MCU? If I have to use code - are there any examples on SDK how to do it?
0 Kudos

247 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi mimers19 

I don't have LPC5410x board for test by myself. But I think below C code should readout UID

unsigned int uid[4];

uid[0]= *(unsigned int*) 0x01800100;
uid[1]= *(unsigned int*) 0x01800104;
uid[2]= *(unsigned int*) 0x01800108;
uid[3]= *(unsigned int*) 0x0180010C;

Thanks,

Jun Zhang

 

0 Kudos