fix(core): fix tropic reset by adding chip select handling
What changed, and why it matters
This commit fixes how the Trezor hardware wallet resets its Tropic secure chip during startup. The change makes sure the chip-select line is pulled low before power is toggled and released afterward, which is needed for a clean reset. There is no direct evidence this is a security vulnerability rather than a reliability bug, but improper reset handling of a security chip could in theory lead to an unstable or unpredictable secure state.
Treat as a device-stability and potential security-hardening fix. Verify that the new reset sequence matches the Tropic01 vendor specification and that removing the 10 ms post-delay does not violate timing requirements. Consider adding a regression test or comment explaining the security relevance of the NSS handling.
Security signals we found
Reset-sequence change for a secure-element/coprocessor (Tropic01)
Chip-select line now explicitly managed during power-cycle reset
No changelog entry provided, limiting public context
Evidence from the diff
In core/embed/sec/tropic/stm32/tropic01.c, tropic01_reset() now drives TROPIC01_SPI_NSS_PIN to GPIO_PIN_RESET before enabling power, then drives it to GPIO_PIN_SET after the power pin is deasserted. The previous code only toggled the power pin and delayed 10 ms. The patch adds explicit SPI chip-select (NSS/CS) management around the power-cycle reset, which is a common requirement for SPI slaves that use CS as a reset or wake signal. The 10 ms post-reset delay was removed/replaced by the NSS deassertion.
Changed components
core/embed/sec/tropic/stm32/tropic01.cTropic01 secure chip driverTrezor Core firmware reset pathInspect captured patch +3 / −1
diff --git a/core/embed/sec/tropic/stm32/tropic01.c b/core/embed/sec/tropic/stm32/tropic01.c
index d273e6236..d9c36ddfc 100644
--- a/core/embed/sec/tropic/stm32/tropic01.c
+++ b/core/embed/sec/tropic/stm32/tropic01.c
@@ -39,10 +39,12 @@ static tropic_ui_progress_t ui_progress = NULL;
void tropic_set_ui_progress(tropic_ui_progress_t f) { ui_progress = f; }
void tropic01_reset(void) {
+ HAL_GPIO_WritePin(TROPIC01_SPI_NSS_PORT, TROPIC01_SPI_NSS_PIN,
+ GPIO_PIN_RESET);
HAL_GPIO_WritePin(TROPIC01_PWR_PORT, TROPIC01_PWR_PIN, GPIO_PIN_SET);
systick_delay_ms(10);
HAL_GPIO_WritePin(TROPIC01_PWR_PORT, TROPIC01_PWR_PIN, GPIO_PIN_RESET);
- systick_delay_ms(10);
+ HAL_GPIO_WritePin(TROPIC01_SPI_NSS_PORT, TROPIC01_SPI_NSS_PIN, GPIO_PIN_SET);
}
lt_ret_t lt_port_init(lt_l2_state_t *s2) {
Why this scored 29/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.