X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=boards%2Fek-lm3s1968%2Fhw%2Fhw_adc.h;h=1f6aeadd6f200eaab6aa0b58214cba231df5e1e7;hb=c0b42e1e8494eeeca4871c86321ef56446b604f2;hp=66d643656bd8cce3340ec8847f12dd0076919071;hpb=40ba6f2fce8f3cecc68a04cac0b949b08e4cba3a;p=bertos.git diff --git a/boards/ek-lm3s1968/hw/hw_adc.h b/boards/ek-lm3s1968/hw/hw_adc.h index 66d64365..1f6aeadd 100644 --- a/boards/ek-lm3s1968/hw/hw_adc.h +++ b/boards/ek-lm3s1968/hw/hw_adc.h @@ -39,7 +39,7 @@ #define HW_ADC_H #include -#include +#include #include @@ -76,8 +76,11 @@ INLINE void hw_initIntTemp(void) /* Enable ADC0 clock */ SYSCTL_RCGC0_R |= SYSCTL_RCGC0_ADC0; - /* Why this??? */ - timer_udelay(1); + /* + * We wait some time because the clock is istable + * and that could cause system hardfault + */ + lm3s_busyWait(10); /* Disable all sequence */ HWREG(ADC0_BASE + ADC_O_ACTSS) = 0;