mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-10 15:30:55 +00:00
firmware/main.c: simplify
This commit is contained in:
parent
9fd5f05f1f
commit
1db09f88a1
@ -50,16 +50,14 @@ int main(void) {
|
|||||||
// Enable the CCM RAM
|
// Enable the CCM RAM
|
||||||
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
|
__HAL_RCC_CCMDATARAMEN_CLK_ENABLE();
|
||||||
|
|
||||||
// machine_init
|
// Clear the reset flags
|
||||||
if (PWR->CSR & PWR_CSR_SBF) {
|
|
||||||
PWR->CR |= PWR_CR_CSBF;
|
PWR->CR |= PWR_CR_CSBF;
|
||||||
}
|
|
||||||
RCC->CSR |= RCC_CSR_RMVF;
|
RCC->CSR |= RCC_CSR_RMVF;
|
||||||
|
|
||||||
// Enable CPU ticks
|
// Enable CPU ticks
|
||||||
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
|
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; // Enable DWT
|
||||||
DWT->CYCCNT = 0;
|
DWT->CYCCNT = 0; // Reset Cycle Count Register
|
||||||
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
|
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; // Enable Cycle Count Register
|
||||||
|
|
||||||
pendsv_init();
|
pendsv_init();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user