Electronics > Microcontrollers

NXP/LPC - Detecting device type

(1/2) > >>

JJalling:
Hello all,

I'm currently merging/stream-lining the firmware on two old products. For easier maintenance I want to use the same binary firmware for both products, since 99.9% of the code is the same anyway - just two different generations of the board.
They both use the same LPC1549 chip, but in different physical packages - one being a 48 pin package and the other a 100 pin package. This means that PIO-bank 1 and 2 are only available on physical pins on the 100 pin package.

I want the software to be able to detect what chip package it is and since it's probably the same die, there is not a register where I can simply read the difference - only the overall type.

My idea is to rely on the fact that (I assume) it's the same physical die, and that there is a strong pull-up connected to some of the pins on bank 1 and 2 on the board with the 100 pin package.
By enabling the internal pull-down resistors on these pins during startup, I can detect if it's one or the other, by reading the pin state (the external pull-ups are stronger than the internal ones).

Has anyone done anything like this before? It seems to work, but my only concern is that the pin registers in the 48 pin package are marked as reserved (which I guess they are) in the datasheet.

Thanks for your help,

BR Jonas

nctnico:
You can read the part ID through the IAP API. There is a list somewhere with part IDs. The source code from this project is likely a good start to get a list: http://www.windscooting.com/softy/mxli.html#Latest

Fred27:
If there's not anything in the IC that can help, is there a feature of your board than can identify one or the other? e.g. read one of the inputs that's only connected on the 100 pin device.

JJalling:

--- Quote from: nctnico on August 04, 2021, 07:56:45 am ---You can read the part ID through the IAP API. There is a list somewhere with part IDs. The source code from this project is likely a good start to get a list: http://www.windscooting.com/softy/mxli.html#Latest

--- End quote ---

The part-id is the same for the two chips - only the package size/pin-count differ.

BR Jonas

JJalling:

--- Quote from: Fred27 on August 04, 2021, 08:03:36 am ---If there's not anything in the IC that can help, is there a feature of your board than can identify one or the other? e.g. read one of the inputs that's only connected on the 100 pin device.

--- End quote ---

Well, that was actually what (I tried to) explain in the first post. There are some pins on the 100 pin device that I can read and compare with the 48 pin device, after enabling the internal pull-down resistors on said pins.

BR Jonas

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version