Skip to content

Commit 7e8cfa8

Browse files
committed
[NRF52840]: fix SdBlockDevice capability device by disabling SPI_ASYNC mode.
1 parent c4acf19 commit 7e8cfa8

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

targets/TARGET_NORDIC/TARGET_NRF5_SDK13/TARGET_MCU_NRF52840/sdk/sdk_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,7 @@
15661566
// <e> RTC_ENABLED - nrf_drv_rtc - RTC peripheral driver
15671567
//==========================================================
15681568
#ifndef RTC_ENABLED
1569-
#define RTC_ENABLED 0
1569+
#define RTC_ENABLED 1
15701570
#endif
15711571
#if RTC_ENABLED
15721572
// <o> RTC_DEFAULT_CONFIG_FREQUENCY - Frequency <16-32768>

targets/TARGET_NORDIC/TARGET_NRF5_SDK13/spi_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,14 @@ static void master_event_handler(uint8_t spi_idx,
144144
if (p_event->type == NRF_DRV_SPI_EVENT_DONE)
145145
{
146146
p_spi_info->flag.busy = false;
147+
#if DEVICE_SPI_ASYNCH
147148
if (p_spi_info->handler)
148149
{
149150
void (*handler)(void) = (void (*)(void))p_spi_info->handler;
150151
p_spi_info->handler = 0;
151152
handler();
152153
}
154+
#endif // if DEVICE_SPI_ASYNCH
153155
}
154156
}
155157
#define MASTER_EVENT_HANDLER(idx) \

targets/targets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2696,7 +2696,7 @@
26962696
"supported_form_factors": ["ARDUINO"],
26972697
"inherits": ["MCU_NRF52840"],
26982698
"macros_add": ["BOARD_PCA10056", "CONFIG_GPIO_AS_PINRESET", "SWI_DISABLE0", "NRF52_ERRATA_20"],
2699-
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"],
2699+
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE"],
27002700
"release_versions": ["2", "5"],
27012701
"device_name": "nRF52840_xxAA"
27022702
},

0 commit comments

Comments
 (0)