Memory Address: 0x80101C14 - 0x80101C30
The PASSWORD field stores the SHA-256 hash (32 bytes) of the password used for BSL
authentication. This password is required to unlock the bootloader and access
protected BSL commands.
Default Value: The hash of a string of all 0xFF bytes
- Word 0 (0x80101C14): 0x761396AF
- Word 1 (0x80101C18): 0x5F63720F
- Word 2 (0x80101C1C): 0x5A4AB4BD
- Word 3 (0x80101C20): 0x9FC3630A
- Word 4 (0x80101C24): 0xF930AF12
- Word 5 (0x80101C28): 0x5CEEA650
- Word 6 (0x80101C2C): 0x88E11B97
- Word 7 (0x80101C30): 0x51409CE8
Usage
The BSL password is used to protect access to critical BSL commands that can modify
the device memory or read sensitive information. When the BSL is invoked, it starts
in a locked state. To unlock the BSL and access protected commands, the host must
send the Unlock Bootloader command (CMD_UNLOCK_BSL, 0x21) with the correct
password.
The password authentication process works as follows:
- The host sends the Unlock Bootloader command with a 32-byte password.
- The BSL calculates the SHA-256 hash of the received password.
- The BSL compares the calculated hash with the stored password hash in the
BSL configuration.
- If the hashes match, the BSL is unlocked and protected commands become
available.
- If the hashes do not match, the BSL remains locked and returns a
BSL_PASSWORD_ERROR.
The BSL includes several security features to protect against password attacks:
- Sleep Delay: If an incorrect password is sent, the device enters
sleep mode for 2 seconds and does not accept any commands during this
period. This makes brute force attacks more time-consuming.
- Security Alert: If an incorrect password is sent 3 times, a security
alert action is taken based on the SECURITY_ALERT_LEVEL configuration. This
can include:
- Factory Reset: Erases all flash memory
- Disable Bootloader: Permanently disables the bootloader
- Do Nothing: No action is taken
- Password Backup: Before performing a factory reset, the BSL backs up
the password to SRAM. This allows the BSL to be unlocked after a factory
reset, even if the password field in non-main flash is erased.
Changing the BSL Password
There are multiple methods to change the BSL password
- Using BSL Commands
- Unlock the BSL with the current password.
- Calculate the SHA-256 hash of the new password.
- Update the PASSWORD field in the BSL configuration with the new
hash.
- Calculate the new CRC for the BSL configuration.
- Program the updated BSL configuration to non-main flash using the
Program Data command.
- Using SysConfig and Code Composer Studio (CCS)The SysConfig tool
provides a Non-Main Configurator that can generate a complete non-main
configuration. If the non-main flash area is not protected, you can use the
Flash Loader in Code Composer Studio to directly modify the BSL password.
- Open the SysConfig tool in CCS or as a standalone application.
- Navigate to the Non-Main Configurator section.
- Configure all the BSL settings, including the PASSWORD field with
the hash of the new password.
- Generate the non-main configuration binary.
- Program the generated binary to the non-main flash area using CCS
Flash Loader or BSL commands.
Note: If you forget the BSL password, you may need to perform a DSSM factory reset
to restore the default password. However, this will erase all flash memory,
including the application code and configuration data. Alternatively, if the
non-main flash area is not protected, you can use CCS with Flash Loader to
reprogram the BSL configuration with a new password.