diff --git a/embed/boardloader/lowlevel.c b/embed/boardloader/lowlevel.c index 0e7433bfcf..d74bb09e95 100644 --- a/embed/boardloader/lowlevel.c +++ b/embed/boardloader/lowlevel.c @@ -32,6 +32,7 @@ #define WANT_WRP_SECTORS (0) #endif +// BOR LEVEL 3: Reset level threshold is around 2.5 V #define WANT_BOR_LEVEL (OB_BOR_LEVEL3) // reference RM0090 section 3.9.10; SPRMOD is 0 meaning PCROP disabled.; DB1M is 0 because we use 2MB dual-bank; BFB2 is 0 allowing boot from flash; diff --git a/embed/trezorhal/sdcard.c b/embed/trezorhal/sdcard.c index e90be7b465..e5a8f5196b 100644 --- a/embed/trezorhal/sdcard.c +++ b/embed/trezorhal/sdcard.c @@ -70,16 +70,9 @@ static inline void sdcard_default_pin_state(void) { HAL_GPIO_Init(GPIOC, &GPIO_InitStructure); // configure SD GPIO -#if 1 GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStructure.Pull = GPIO_NOPULL; GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_LOW; -#else - GPIO_InitStructure.Mode = GPIO_MODE_AF_PP; - GPIO_InitStructure.Pull = GPIO_PULLUP; - GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStructure.Alternate = GPIO_AF12_SDIO; -#endif GPIO_InitStructure.Pin = GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12; HAL_GPIO_Init(GPIOC, &GPIO_InitStructure); GPIO_InitStructure.Pin = GPIO_PIN_2; @@ -95,6 +88,7 @@ static inline void sdcard_default_pin_state(void) { static inline void sdcard_active_pin_state(void) { HAL_GPIO_WritePin(GPIOC, GPIO_PIN_0, GPIO_PIN_RESET); // SD_ON/PC0 + HAL_Delay(10); // we need to wait until the circuit fully kicks-in GPIO_InitTypeDef GPIO_InitStructure; diff --git a/embed/trezorhal/touch.c b/embed/trezorhal/touch.c index 25cf616e61..1437f30f88 100644 --- a/embed/trezorhal/touch.c +++ b/embed/trezorhal/touch.c @@ -60,6 +60,8 @@ static inline void touch_default_pin_state(void) { static inline void touch_active_pin_state(void) { HAL_GPIO_WritePin(GPIOB, GPIO_PIN_10, GPIO_PIN_RESET); // CTP_ON/PB10 + HAL_Delay(10); // we need to wait until the circuit fully kicks-in + HAL_GPIO_WritePin(GPIOC, GPIO_PIN_5, GPIO_PIN_SET); // CTP_REST/PC5 GPIO_InitTypeDef GPIO_InitStructure;