From c282733058e60432065b96574ad0e4be53272a63 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 21 Nov 2013 14:47:37 -0600 Subject: [PATCH] LPC-H3131: SDRAM comments updated --- configs/olimex-lpc-h3131/src/lpc31_mem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configs/olimex-lpc-h3131/src/lpc31_mem.c b/configs/olimex-lpc-h3131/src/lpc31_mem.c index 42715226da..389a62f4e6 100644 --- a/configs/olimex-lpc-h3131/src/lpc31_mem.c +++ b/configs/olimex-lpc-h3131/src/lpc31_mem.c @@ -109,8 +109,10 @@ static uint32_t lpc31_ns2clk(uint32_t ns, uint32_t hclk2) { - /* Example: ns=80, hclk2=90000000 - * clocks = 80 * 90000000 / 1000000000 + 1 = 8 + /* delay (ns) * hclk (Hz) / scale (ns/sec) = cycles + * + * Example: ns=80, hclk2=90000000 + * clocks = 80 * 90000000 / 1000000000 + 1 = 8 (actual 7.2 cycles) */ uint64_t tmp = (uint64_t)ns * (uint64_t)hclk2 / 1000000000ull;