From ae89a65956f95c2bee652396286d97b47ff804b6 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 24 Mar 2021 19:49:08 -0400 Subject: [PATCH] lpc176x: Do not modify PCLKSELx at runtime The lpc176x has an errata that could cause updates to PCLKSELx to not take effect. Rework the code to use the default peripheral clock speed (25Mhz or 30Mhz) so that this register does not need to be updated at runtime. Signed-off-by: Kevin O'Connor --- src/lpc176x/main.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/lpc176x/main.c b/src/lpc176x/main.c index b35e31eee..d12bcd57d 100644 --- a/src/lpc176x/main.c +++ b/src/lpc176x/main.c @@ -49,20 +49,13 @@ void enable_pclock(uint32_t pclk) { LPC_SC->PCONP |= 1<PCLKSEL0 = (LPC_SC->PCLKSEL0 & ~(0x3<PCLKSEL1 = (LPC_SC->PCLKSEL1 & ~(0x3<