AnsweredAssumed Answered

What is blhost property 0x18 Target Version?

Question asked by Lucas Magasweran on Aug 8, 2017
Latest reply on Aug 9, 2017 by Kerry Zhou

I am reading the Kinetis blhost User's Guide, Rev. 3, 04/2016 from http://www.nxp.com/docs/en/user-guide/KBLHOSTUG.pdf and came across the property 0x18 that is not documented anywhere.

 

Section: 4.2.2 get-property

Example: -- get-property 10

This command is used to query the bootloader about various properties and settings. Each supported property has a unique integer tag value.

tag:

• 0x01 The Current Version of the Kinetis bootloader.

• 0x02 A mask of the Available Peripherals.

• 0x03 The starting address of the on-chip flash.

• 0x04 The size of the on-chip flash.

• 0x05 The size in bytes of one sector of program flash. This is the minimum erase size.

• 0x06 The number of blocks in the on-chip flash.

• 0x07 A mask of the Available Commands.

• 0x08 Status code from the last CRC check operation. Available only if the CRC check feature is supported.

• 0x09 Reserved for future use.

• 0x0a Verify Writes Flag - Boolean controlling whether the bootloader verifies writes to flash. A value of 0 means no verification is done, a value of 1 enables verification. This feature is enabled by default.

• 0x0b The maximum supported packet size for the currently active peripheral interface.

• 0x0c Reserved Regions - List of memory regions reserved by the bootloader. Returned as value pairs (,). If HasDataPhase flag is not set, response packet parameter count indicates number of pairs. If HasDataPhase flag is set, second parameter is the number of bytes in the data phase.

• 0x0e The starting address of the on-chip RAM.

• 0x0f The size in bytes of the on-chip RAM.

• 0x10 The value of the Kinetis System Device Identification register.

• 0x11 Flash Security Enabled Flag - Boolean indicating whether flash security is enabled. 0 means disabled, 1 means enabled.

• 0x12 The values of the Device Unique ID. The number of ID words is indicated by the parameter count in the response packet.

• 0x13 FAC Supported Flag - Boolean indicating whether Flash Access Control (FAC) module is supported. 0 means not supported, 1 means supported.

• 0x14 The number of bytes per FAC segment.

• 0x15 The number of segments available in the FAC.

• 0x16 The flash read margin setting. A value of 0 indicates Normal read margin, a value of 1 indicates User read margin, and a value of 2 indicates Factory read margin. The default is User.

• 0x17 Reserved for future use.

• 0x18 Target Version - the target build version number.

• 0x19 External Memory Attributes - memoryId is required.

On my K26 is returns:

$ sudo ./blhost -u -- get-property 0x18
Creating peripheral of type '5'
Inject command 'get-property'
Response status = 0 (0x0) Success.
Response word 1 = 1409351680 (0x54010000)
Target Version = T1.0.0

And 0x01 returns:

$ sudo ./blhost -u -- get-property 1
Creating peripheral of type '5'
Inject command 'get-property'
Response status = 0 (0x0) Success.
Response word 1 = 1258422272 (0x4b020000)
Current Version = K2.0.0

What is it? Is it something we can use to report the application version from the bootloader (e.g. from a known offset in flash)?

Outcomes