Program to identify Kinetis MCU part number

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Program to identify Kinetis MCU part number

4,793 次查看
arunkannan
Contributor III

I need the MCU part number for example for Kinetis MCU MKL16Z128VFT4, the part number "MKL16Z128VFT4" has to be fetched from the hardware for the bootloader to identify the MCU. How can I do this and identify the MCU part number using program?

 

0 项奖励
回复
2 回复数

4,609 次查看
Devyy
Contributor II

Hello arunkannan,

You can do this using the System Device Identification Register (SIM_SDID) of your device.
This Read-Only register contains every information you need to identify the Part-Number of your chip.

Devyy_0-1718617273829.png


For exemple, for your device you can do something like this :

- Read the register
- Check if FAMID is equal to 1. (KL1x Family (basic))
- Check if SUBFAMID is equal to 0b0110 (KLx6 Subfamily)
- Check if SRAMSIZE is equal to 0b0101 (16 KB)
- Check if PINID is equal to 0b0100 (48-pin)

You can find the specifications of this register in the reference manual : 
12.2.6 System Device Identification Register (SIM_SDID).

You can also do a sort of "if-tree" to identify your specific configuration.

Devyy_1-1718617623508.pngDevyy_2-1718617634569.png


Hope it will help you, feel free to ask if you need anything else.

Devyy



PS: I forgot it but you can also identify the flash size of your device using the Flash Configuration Register 1 (SIM_FCFG1).

Devyy_0-1718617868346.png

Devyy_1-1718617880005.png


So, for your device you must read 0b111 for 128 KB.

 




0 项奖励
回复

4,768 次查看
bobpaddock
Senior Contributor III

Human readable things like "MKL16Z128VFT4" never appear anyplace inside the chip.
Often, not always, can be deduced by reading various registers.
See the attached files, starting with sys_id.c, that I use to deduce things about the MKL27.

There is some Magick linker tricks not show here because flash_kinetis_cmd.c needs to run from RAM.
Many not required for just the ID code, I never tried it that way.  It is required for flash erase and program commands that this file is also used for.

0 项奖励
回复