From 83641b3789cb24498212cc96430ced2b70e5b65b Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Sat, 2 Mar 2019 01:30:09 -0500 Subject: [PATCH] disable clock settings for NFC passive for now --- targets/stm32l432/src/device.c | 30 ++++++++++++------------ targets/stm32l432/src/system_stm32l4xx.c | 3 ++- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/targets/stm32l432/src/device.c b/targets/stm32l432/src/device.c index da82d8b..329dca3 100644 --- a/targets/stm32l432/src/device.c +++ b/targets/stm32l432/src/device.c @@ -110,28 +110,28 @@ void device_reboot() void device_init() { - hw_init(LOW_FREQUENCY); - isLowFreq = 1; + hw_init(HIGH_FREQUENCY); + isLowFreq = 0; - haveNFC = nfc_init(); + // haveNFC = nfc_init(); - if (haveNFC) - { - printf1(TAG_NFC, "Have NFC\r\n"); - } - else - { - printf1(TAG_NFC, "Have NO NFC\r\n"); - hw_init(HIGH_FREQUENCY); - - isLowFreq = 0; - } + // if (haveNFC) + // { + // printf1(TAG_NFC, "Have NFC\r\n"); + // } + // else + // { + // printf1(TAG_NFC, "Have NO NFC\r\n"); + // hw_init(HIGH_FREQUENCY); + // + // isLowFreq = 0; + // } usbhid_init(); ctaphid_init(); - ctap_init( !haveNFC ); + ctap_init( 1 ); #if BOOT_TO_DFU flash_option_bytes_init(1); diff --git a/targets/stm32l432/src/system_stm32l4xx.c b/targets/stm32l432/src/system_stm32l4xx.c index a903c1c..897afd2 100644 --- a/targets/stm32l432/src/system_stm32l4xx.c +++ b/targets/stm32l432/src/system_stm32l4xx.c @@ -221,7 +221,8 @@ void SystemInit(void) /* Disable all interrupts */ RCC->CIER = 0x00000000U; - device_set_clock_rate(DEVICE_LOW_POWER_IDLE); + // TODO this is causing boot issues for old bootloader + // device_set_clock_rate(DEVICE_LOW_POWER_IDLE); }