![]() |
Kinetis Bootloader
2.0.0
Common bootloader for Kinetis devices
|
Properties of the bootloader. More...
Data Structures | |
| struct | bootloader_configuration_data_t |
| Format of bootloader configuration data on Flash. More... | |
| struct | reserved_region_t |
| Structure of a reserved regions entry. More... | |
| struct | unique_device_id_t |
| Structure of a unique device id. More... | |
| struct | external_memory_property_store_t |
| Exernal Memory attribute store. More... | |
| struct | property_store_t |
| Structure of property store. More... | |
| struct | external_memory_property_interface_t |
| External Memory properties interface. More... | |
| struct | property_interface_t |
| Interface to property operations. More... | |
Enumerations | |
| enum | _property_errors { kStatus_UnknownProperty = MAKE_STATUS(kStatusGroup_PropertyStore, 0), kStatus_ReadOnlyProperty = MAKE_STATUS(kStatusGroup_PropertyStore, 1), kStatus_InvalidPropertyValue = MAKE_STATUS(kStatusGroup_PropertyStore, 2) } |
| Property store status codes. More... | |
| enum | _property_tag { kPropertyTag_ListProperties = 0x00, kPropertyTag_BootloaderVersion = 0x01, kPropertyTag_AvailablePeripherals = 0x02, kPropertyTag_FlashStartAddress = 0x03, kPropertyTag_FlashSizeInBytes = 0x04, kPropertyTag_FlashSectorSize = 0x05, kPropertyTag_FlashBlockCount = 0x06, kPropertyTag_AvailableCommands = 0x07, kPropertyTag_CrcCheckStatus = 0x08, kPropertyTag_Reserved9 = 0x09, kPropertyTag_VerifyWrites = 0x0a, kPropertyTag_MaxPacketSize = 0x0b, kPropertyTag_ReservedRegions = 0x0c, kPropertyTag_Reserved13 = 0x0d, kPropertyTag_RAMStartAddress = 0x0e, kPropertyTag_RAMSizeInBytes = 0x0f, kPropertyTag_SystemDeviceId = 0x10, kPropertyTag_FlashSecurityState = 0x11, kPropertyTag_UniqueDeviceId = 0x12, kPropertyTag_FacSupport = 0x13, kPropertyTag_FlashAccessSegmentSize = 0x14, kPropertyTag_FlashAccessSegmentCount = 0x15, kPropertyTag_FlashReadMargin = 0x16, kPropertyTag_QspiInitStatus = 0x17, kPropertyTag_TargetVersion = 0x18, kPropertyTag_ExternalMemoryAttributes = 0x19, kPropertyTag_ReliableUpdateStatus = 0x1a, kPropertyTag_InvalidProperty = 0xFF } |
| Property tags. More... | |
| enum | _property_constants { kProperty_ReservedRegionsCount = 2, kProperty_FlashReservedRegionIndex = 0, kProperty_RamReservedRegionIndex = 1, kProperty_FlashVersionIdSizeInBytes = 8 } |
| Property constants. | |
| enum | _clock_flags { kClockFlag_HighSpeed = (1 << 0) } |
| Bit positions for clock flags in configuration data. | |
| enum | _boot_flags { kBootFlag_DirectBoot = (1 << 0) } |
| Bit positions for boot flags in configuration data. | |
| enum | _flash_constants { kBootloaderConfigAreaAddress = (uint32_t)(APP_VECTOR_TABLE) + 0x3c0 } |
| Flash constants. More... | |
| enum | _external_memory_property_tags { kExternalMemoryPropertyTag_InitStatus = 0, kExternalMemoryPropertyTag_StartAddress = 1, kExternalMemoryPropertyTag_MemorySizeInKbytes = 2, kExternalMemoryPropertyTag_PageSize = 3, kExternalMemoryPropertyTag_SectorSize = 4, kExternalMemoryPropertyTag_BlockSize = 5, kExternalMemoryPropertyTag_Start = kExternalMemoryPropertyTag_StartAddress, kExternalMemoryPropertyTag_End = kExternalMemoryPropertyTag_BlockSize } |
| External Memory Properties tag. More... | |
| enum | _ram_constants { kRAMCount = 3, kRAMCount = 3 } |
| enum | _property_store_tags { kPropertyStoreTag = FOUR_CHAR_CODE('k', 'c', 'f', 'g') } |
Variables | |
| const property_interface_t | g_propertyInterface |
| Property interface. | |
Command Availability | |
| enum | _available_commands { kAvailableCommands } |
Property Store | |
| status_t | bootloader_property_load_user_config (void) |
| Early initialization function to get user configuration data. | |
| status_t | bootloader_property_init (void) |
| Initialize the property store. More... | |
| status_t | bootloader_property_get (uint8_t tag, uint8_t memoryId, const void **value, uint32_t *valueSize) |
| Get a property. More... | |
| status_t | bootloader_property_set_uint32 (uint8_t tag, uint32_t value) |
| Set a property. More... | |
Properties of the bootloader.
| struct bootloader_configuration_data_t |
Format of bootloader configuration data on Flash.
| struct reserved_region_t |
| struct unique_device_id_t |
| struct external_memory_property_store_t |
Exernal Memory attribute store.
| struct property_store_t |
Structure of property store.
Collaboration diagram for property_store_t:| Data Fields | ||
|---|---|---|
| uint32_t | availableCommands |
verificaton. Writable by host. Bit mask of the available commands. |
| uint32_t | availablePeripherals |
The set of peripherals supported available on this chip. See enum _peripheral_types in bl_peripheral.h. |
| standard_version_t | bootloaderVersion | Current bootloader version. |
| bootloader_configuration_data_t | configurationData | Configuration data from flash address 0x3c0-0x3ff in sector 0 (64 bytes max) |
| uint32_t | crcCheckStatus | Status code from the last CRC check operation. |
| external_memory_property_store_t | externalMemoryPropertyStore | Property store for external memory. |
| uint32_t | flashAccessSegmentCount | The count of flash access segment within flash module. |
| uint32_t | flashAccessSegmentSize | The size in bytes of one segment of flash. |
| uint32_t | flashBlockCount | Number of blocks in the flash array. |
| uint32_t | flashBlockSize | The size in bytes of one block of program flash. |
| uint32_t | flashFacSupport | Boolean indicating whether the FAC feature is supported. |
| uint32_t | flashReadMargin | The margin level setting for flash erase and program Verify CMDs. |
| uint32_t | flashSectorSize | The size in bytes of one sector of program flash. This is the minimum erase size. |
| uint32_t | flashSizeInBytes | Size in bytes of program flash. |
| uint32_t | flashStartAddress | Start address of program flash. |
| uint32_t | qspiInitStatus | Result of QSPI+OTFAD init during bootloader startup. |
| uint32_t | ramSizeInBytes[kRAMCount] | Size in bytes of RAM. |
| uint32_t | ramStartAddress[kRAMCount] | Start address of RAM. |
| uint32_t | reliableUpdateStatus | Status of reliable update. |
| reserved_region_t | reservedRegions[kProperty_ReservedRegionsCount] | Flash and Ram reserved regions. |
| standard_version_t | serialProtocolVersion | Serial protocol version number. |
| standard_version_t | targetVersion | Target version number. |
| unique_device_id_t | UniqueDeviceId | Unique identification for the device. |
| uint32_t | verifyWrites |
Boolean controlling whether the bootloader will verify writes to flash. Non-zero enables |
| struct external_memory_property_interface_t |
External Memory properties interface.
Data Fields | |
| uint32_t | memoryId |
| status_t(* | get )(uint32_t tag, uint32_t *value) |
| struct property_interface_t |
Interface to property operations.
Collaboration diagram for property_interface_t:Data Fields | |
| status_t(* | load_user_config )(void) |
| Load the user configuration data. | |
| status_t(* | init )(void) |
| Initialize. | |
| status_t(* | get )(uint8_t tag, uint8_t id, const void **value, uint32_t *valueSize) |
| Get property. | |
| status_t(* | set_uint32 )(uint8_t tag, uint32_t value) |
| Set uint32_t property. | |
| property_store_t * | store |
| The property store. | |
External Memory Properties tag.
| enum _flash_constants |
Flash constants.
| enum _property_errors |
| enum _property_store_tags |
| enum _property_tag |
Property tags.
| status_t bootloader_property_get | ( | uint8_t | tag, |
| uint8_t | memoryId, | ||
| const void ** | value, | ||
| uint32_t * | valueSize | ||
| ) |
Get a property.
Example calling sequence for uint32_t property:
| tag | Tag of the requested property |
| memoryId | Id for specified external memory, for example: 1 represent QuadSPI 0 |
| value | Pointer to where to write a pointer to the result, may be NULL |
| valueSize | Size in bytes of the property value, may be NULL |
| kStatus_Success | |
| kStatus_UnknownProperty |
| status_t bootloader_property_init | ( | void | ) |
Initialize the property store.
Initialize flash properties.
| status_t bootloader_property_set_uint32 | ( | uint8_t | tag, |
| uint32_t | value | ||
| ) |
Set a property.
Only uint32_t properties can be set with this function.
| tag | Tag of the property to set |
| value | New property value |
| kStatus_Success | |
| kStatus_UnknownProperty | |
| kStatus_ReadOnlyProperty |