Skip to content

Commit 62ff0d0

Browse files
authored
Merge pull request #4088 from nvlsianpu/mbed-os-workshop-17q2-spi_sdcard
[NRF52840]: enabled SdBlockDevice capability
2 parents 3102469 + 7e8cfa8 commit 62ff0d0

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,7 +1962,7 @@
19621962

19631963

19641964
#ifndef SPI0_USE_EASY_DMA
1965-
#define SPI0_USE_EASY_DMA 1
1965+
#define SPI0_USE_EASY_DMA 0
19661966
#endif
19671967

19681968
// <o> SPI0_DEFAULT_FREQUENCY - SPI frequency
@@ -1992,7 +1992,7 @@
19921992

19931993

19941994
#ifndef SPI1_USE_EASY_DMA
1995-
#define SPI1_USE_EASY_DMA 1
1995+
#define SPI1_USE_EASY_DMA 0
19961996
#endif
19971997

19981998
// <o> SPI1_DEFAULT_FREQUENCY - SPI frequency
@@ -2022,7 +2022,7 @@
20222022

20232023

20242024
#ifndef SPI2_USE_EASY_DMA
2025-
#define SPI2_USE_EASY_DMA 1
2025+
#define SPI2_USE_EASY_DMA 0
20262026
#endif
20272027

20282028
// <q> SPI2_DEFAULT_FREQUENCY - Use EasyDMA

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
@@ -2705,7 +2705,7 @@
27052705
"supported_form_factors": ["ARDUINO"],
27062706
"inherits": ["MCU_NRF52840"],
27072707
"macros_add": ["BOARD_PCA10056", "CONFIG_GPIO_AS_PINRESET", "SWI_DISABLE0", "NRF52_ERRATA_20"],
2708-
"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"],
2708+
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPISLAVE"],
27092709
"release_versions": ["2", "5"],
27102710
"device_name": "nRF52840_xxAA"
27112711
},

0 commit comments

Comments
 (0)