summaryrefslogtreecommitdiff
path: root/stmhal/modmachine.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-01-29 22:31:56 +0000
committerDamien George <damien.p.george@gmail.com>2016-01-29 22:31:56 +0000
commitea89b80ff4f842b010f9f8ec3280675f81bc6bc5 (patch)
treee3879bcf6d78ee5efeb8cfea32ccad80cf5763e6 /stmhal/modmachine.c
parentd3631339176b768ce1ffdc535223385245ff906b (diff)
stmhal: Make TIM3 available for use by the user.
TIM3 is no longer used by USB CDC for triggering outgoing data, so we can now make it available to the user. PWM fading on LED(4) is now gone, but will be reinstated in a new way.
Diffstat (limited to 'stmhal/modmachine.c')
-rw-r--r--stmhal/modmachine.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/stmhal/modmachine.c b/stmhal/modmachine.c
index 7f72359be..6d71f5c62 100644
--- a/stmhal/modmachine.c
+++ b/stmhal/modmachine.c
@@ -253,7 +253,7 @@ STATIC mp_obj_t machine_freq(mp_uint_t n_args, const mp_obj_t *args) {
//printf("%lu %lu %lu %lu %lu\n", sysclk_source, m, n, p, q);
// let the USB CDC have a chance to process before we change the clock
- HAL_Delay(USBD_CDC_POLLING_INTERVAL + 2);
+ HAL_Delay(5);
// desired system clock source is in sysclk_source
RCC_ClkInitTypeDef RCC_ClkInitStruct;
@@ -316,9 +316,6 @@ STATIC mp_obj_t machine_freq(mp_uint_t n_args, const mp_obj_t *args) {
}
}
- // re-init TIM3 for USB CDC rate
- timer_tim3_init();
-
#if defined(MICROPY_HW_CLK_LAST_FREQ) && MICROPY_HW_CLK_LAST_FREQ
#if defined(MCU_SERIES_F7)
#define FREQ_BKP BKP31R