mbed library sources

Fork of mbed-src by mbed official

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Mon Oct 13 10:15:06 2014 +0100
Parent:
345:2840aac0ab72
Child:
347:832eef7a1e60
Commit message:
Synchronized with git revision 7e29ffcd56b7c96b7685f5df43c095c26e882ecf

Full URL: https://github.com/mbedmicro/mbed/commit/7e29ffcd56b7c96b7685f5df43c095c26e882ecf/

HAL: LPC824 - Correct SPI delay value

Changed in this revision

targets/hal/TARGET_NXP/TARGET_LPC82X/spi_api.c Show annotated file Show diff for this revision Revisions of this file
--- a/targets/hal/TARGET_NXP/TARGET_LPC82X/spi_api.c	Mon Oct 13 08:45:06 2014 +0100
+++ b/targets/hal/TARGET_NXP/TARGET_LPC82X/spi_api.c	Mon Oct 13 10:15:06 2014 +0100
@@ -110,6 +110,7 @@
         spi_format(obj, 8, 0, 1);  // 8 bits, mode 0, slave
     }
     spi_frequency(obj, 1000000);
+    obj->spi->DLY = 2;             // 2 SPI clock times pre-delay
 
     // enable the ssp channel
     ssp_enable(obj);
@@ -139,7 +140,6 @@
 
     // rise DIV value if it cannot be divided
     obj->spi->DIV = (SystemCoreClock + (hz - 1))/hz - 1;
-    obj->spi->DLY = 0;
 
     ssp_enable(obj);
 }