From a36c4462f23cef29d73ecf54a92a1ab37db264e2 Mon Sep 17 00:00:00 2001 From: Masao Hamanaka Date: Fri, 5 Dec 2014 17:35:49 +0900 Subject: [PATCH] Fix a bug that initialize setting of SPI clock value is not correct. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modify the value as below.  uint16_t mask = 0x000c0; ->  uint16_t mask = 0x000c; --- .../mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/spi_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/spi_api.c b/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/spi_api.c index 1acd149b9d..2b479f3df0 100644 --- a/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/spi_api.c @@ -157,7 +157,7 @@ void spi_frequency(spi_t *obj, int hz) { spi_disable(obj); const int P1CLK = 66666666; // 66.6666MHz uint8_t div, brdv; - uint16_t mask = 0x000c0; + uint16_t mask = 0x000c; if (hz <= P1CLK/2 && hz >= P1CLK/255) { div = (P1CLK / hz / 2) -1;