#[repr(u8)]pub enum CommandTag<'a> {
Show 30 variants
NoCommand {
bytes: &'a [u8],
},
FlashEraseAll {
memory_id: u32,
},
FlashEraseRegion {
start_address: u32,
byte_count: u32,
memory_id: u32,
},
ReadMemory {
start_address: u32,
byte_count: u32,
memory_id: u32,
},
WriteMemory {
start_address: u32,
memory_id: u32,
bytes: &'a [u8],
},
FillMemory {
start_address: u32,
byte_count: u32,
pattern: u32,
},
FlashSecurityDisable = 6,
GetProperty {
tag: PropertyTagDiscriminants,
memory_index: u32,
},
ReceiveSBFile {
bytes: &'a [u8],
},
Execute {
start_address: u32,
argument: u32,
stackpointer: u32,
},
Call {
start_address: u32,
argument: u32,
},
Reset = 11,
SetProperty {
tag: PropertyTagDiscriminants,
value: u32,
},
FlashEraseAllUnsecure = 13,
FlashProgramOnce {
index: u32,
count: u32,
data: u32,
},
FlashReadOnce {
index: u32,
count: u32,
},
FlashReadResource = 16,
ConfigureMemory {
memory_id: u32,
address: u32,
},
ReliableUpdate = 18,
GenerateKeyBlob = 19,
FuseProgram {
start_address: u32,
bytes: &'a [u8],
memory_id: u32,
},
KeyProvisioning(&'a KeyProvOperation),
TrustProvisioning(&'a TrustProvOperation),
FuseRead {
start_address: u32,
byte_count: u32,
memory_id: u32,
},
UpdateLifeCycle = 24,
EleMessage = 25,
EL2GO = 32,
ConfigureI2C = 193,
ConfigureSPI = 194,
ConfigureCAN = 195,
}Expand description
MCU Bootloader Command Tags
§Command Categories
- Memory Operations: Read, write, fill, and erase memory regions
- Flash Operations: Specialized flash programming and security operations
- Device Control: Reset, execute, and property management
- Security: Key provisioning, trust provisioning, and lifecycle management
- Protocol Configuration: Setup for various communication interfaces
Variants§
NoCommand
Used to load flashloader into the memory
FlashEraseAll
Erase all flash memory sectors
FlashEraseRegion
Erase specific flash memory region
Fields
ReadMemory
Read data from memory
Fields
WriteMemory
Write data to memory
Fields
FillMemory
Fill memory region with pattern
Fields
FlashSecurityDisable = 6
Disable flash read/write protection
GetProperty
Get device property value
Fields
tag: PropertyTagDiscriminantsProperty identifier to retrieve
ReceiveSBFile
Process Secure Binary (SB) file
Execute
Execute code at specified address
Fields
Call
Call function
Reset = 11
Reset the MCU
SetProperty
Set device property value
FlashEraseAllUnsecure = 13
Erase all flash and remove security
FlashProgramOnce
Program One-Time Programmable (OTP) memory
FlashReadOnce
Read One-Time Programmable (OTP) memory
FlashReadResource = 16
Read flash resource information
ConfigureMemory
Configure external memory interface
ReliableUpdate = 18
Perform reliable update operation
GenerateKeyBlob = 19
Generate encrypted key blob
FuseProgram
Program device fuses
Fields
KeyProvisioning(&'a KeyProvOperation)
Key provisioning operations
TrustProvisioning(&'a TrustProvOperation)
Trust provisioning operations
FuseRead
Read device fuses
Fields
UpdateLifeCycle = 24
Update device lifecycle state
EleMessage = 25
Send EdgeLock Enclave message
EL2GO = 32
EdgeLock 2GO provisioning operations
ConfigureI2C = 193
Configure I2C interface parameters
ConfigureSPI = 194
Configure SPI interface parameters
ConfigureCAN = 195
Configure CAN interface parameters
Trait Implementations§
Source§impl<'a> Clone for CommandTag<'a>
impl<'a> Clone for CommandTag<'a>
Source§fn clone(&self) -> CommandTag<'a>
fn clone(&self) -> CommandTag<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CommandToParams for CommandTag<'_>
impl CommandToParams for CommandTag<'_>
Source§fn to_params(&self) -> (Vec<u32>, Option<&[u8]>)
fn to_params(&self) -> (Vec<u32>, Option<&[u8]>)
Convert command to parameters and optional data phase.
Converts the command into a tuple containing command parameters as a vector of u32 values and an optional byte slice for data phase transmission.
§Returns
A tuple where the first element contains command parameters and the second contains optional data phase bytes