From 22230e50a688ac1cdd3145399cb5def52879d0a1 Mon Sep 17 00:00:00 2001 From: rasky Date: Wed, 29 Sep 2010 12:32:42 +0000 Subject: [PATCH] SEC: added cpu_relax() in busy-wait loop. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4341 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/sec/random_lm3s.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bertos/sec/random_lm3s.c b/bertos/sec/random_lm3s.c index 0adc96ce..b5945f46 100644 --- a/bertos/sec/random_lm3s.c +++ b/bertos/sec/random_lm3s.c @@ -36,6 +36,7 @@ */ #include "random_p.h" +#include #include #include @@ -47,7 +48,8 @@ INLINE uint16_t hw_readRawTemp(void) /* Trig the temperature sampling */ HWREG(ADC0_BASE + ADC_O_PSSI) |= ADC_PSSI_SS3; - while (!(HWREG(ADC0_BASE + ADC_O_SSFSTAT3) & ADC_SSFSTAT3_FULL)); + while (!(HWREG(ADC0_BASE + ADC_O_SSFSTAT3) & ADC_SSFSTAT3_FULL)) + cpu_relax(); return (uint16_t)HWREG(ADC0_BASE + ADC_O_SSFIFO3); } -- 2.25.1