mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-15 19:08:07 +00:00
fix(core): correct swapped F4/U5 reset flags
[no changelog]
This commit is contained in:
parent
a1ab50017d
commit
3a19609035
@ -29,8 +29,9 @@ secbool reset_flags_check(void) {
|
||||
// for production. check the reset flags to assure that we arrive here due to
|
||||
// a regular full power-on event, and not as a result of a lesser reset.
|
||||
if ((RCC->CSR & (RCC_CSR_LPWRRSTF | RCC_CSR_WWDGRSTF | RCC_CSR_IWDGRSTF |
|
||||
RCC_CSR_SFTRSTF | RCC_CSR_PINRSTF | RCC_CSR_BORRSTF |
|
||||
RCC_CSR_OBLRSTF)) != (RCC_CSR_PINRSTF | RCC_CSR_BORRSTF)) {
|
||||
RCC_CSR_SFTRSTF | RCC_CSR_PORRSTF | RCC_CSR_PINRSTF |
|
||||
RCC_CSR_BORRSTF)) !=
|
||||
(RCC_CSR_PORRSTF | RCC_CSR_PINRSTF | RCC_CSR_BORRSTF)) {
|
||||
return secfalse;
|
||||
}
|
||||
#endif
|
||||
|
@ -29,9 +29,8 @@ secbool reset_flags_check(void) {
|
||||
// for production. check the reset flags to assure that we arrive here due to
|
||||
// a regular full power-on event, and not as a result of a lesser reset.
|
||||
if ((RCC->CSR & (RCC_CSR_LPWRRSTF | RCC_CSR_WWDGRSTF | RCC_CSR_IWDGRSTF |
|
||||
RCC_CSR_SFTRSTF | RCC_CSR_PORRSTF | RCC_CSR_PINRSTF |
|
||||
RCC_CSR_BORRSTF)) !=
|
||||
(RCC_CSR_PORRSTF | RCC_CSR_PINRSTF | RCC_CSR_BORRSTF)) {
|
||||
RCC_CSR_SFTRSTF | RCC_CSR_PINRSTF | RCC_CSR_BORRSTF |
|
||||
RCC_CSR_OBLRSTF)) != (RCC_CSR_PINRSTF | RCC_CSR_BORRSTF)) {
|
||||
return secfalse;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user