From 1126e7f2a95867585386149228c7a29427e6405c Mon Sep 17 00:00:00 2001 From: arighi Date: Tue, 6 Apr 2010 09:28:17 +0000 Subject: [PATCH] lm3s1968: delay few cycles after enabling the UART peripheral clock. Introduce a small spinning delay to give the oscillator time to stabilize. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3392 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/cortex-m3/drv/kdebug_lm3s.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bertos/cpu/cortex-m3/drv/kdebug_lm3s.c b/bertos/cpu/cortex-m3/drv/kdebug_lm3s.c index e9061d36..7bcfc9ba 100644 --- a/bertos/cpu/cortex-m3/drv/kdebug_lm3s.c +++ b/bertos/cpu/cortex-m3/drv/kdebug_lm3s.c @@ -37,6 +37,7 @@ #include /* for BV() */ #include "kdebug_lm3s.h" +#include "clock_lm3s.h" /* __delay() */ #include "cfg/cfg_debug.h" #include "io/lm3s.h" @@ -123,6 +124,7 @@ INLINE void kdbg_hw_init(void) /* Enable the peripheral clock */ SYSCTL_RCGC1_R |= SYSCTL_RCGC1_UART0; SYSCTL_RCGC2_R |= SYSCTL_RCGC2_GPIOA; + __delay(512); /* Set GPIO A0 and A1 as UART pins */ HWREG(GPIO_PORTA_BASE + GPIO_O_DIR) |= BV(0) | BV(1); -- 2.25.1