From d17b7dd92d209b20bc1e15431d068edc29bf438d Mon Sep 17 00:00:00 2001 From: "Raja D.Singh" Date: Tue, 21 Jul 2020 16:06:05 -0700 Subject: [PATCH] winc1500: nmspi: Don't force definition of USE_OLD_SPI_SW If this macro is forced here SPI driver code uses separate Write and read back for bulk writes and fails doing so. If this is not defined SPI read/write cycle is used and it perfomes successfully. This could be due to a undocumented change in the WiFi module firmware in the newer modules. Did not check with older module (firmware) since I did not have them around. Instead, we make this configurable via Kconfig on Zephyr side and pass as a build option to this module. So that the option is available without having to dig into the driver code. This driver was tested along with nRF52840 and nRF52382 DK boards and found that this define, if forced, will not work. Two boards not working is enough to get this define moved to Kconfig. The corresponding changes in Zephyr are in zephyrproject-rtos/zephyr#26907 Signed-off-by: Raja D.Singh --- asf/common/components/wifi/winc1500/driver/source/nmspi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/asf/common/components/wifi/winc1500/driver/source/nmspi.c b/asf/common/components/wifi/winc1500/driver/source/nmspi.c index aa3dc6fe..68fed2e7 100644 --- a/asf/common/components/wifi/winc1500/driver/source/nmspi.c +++ b/asf/common/components/wifi/winc1500/driver/source/nmspi.c @@ -42,7 +42,9 @@ #ifdef CONF_WINC_USE_SPI +/* Don't force USE_OLD_SPI_SW, instead we will pass it from Zephyr side #define USE_OLD_SPI_SW +*/ #include "bus_wrapper/include/nm_bus_wrapper.h" #include "nmspi.h"