Skip to content

Commit 22dc0cd

Browse files
3djcgagarinlg
3djc
authored andcommitted
fix: gx12 SD write issue (possibly temporary fix)
1 parent 21012d3 commit 22dc0cd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

radio/src/targets/common/arm/stm32/sdcard_spi.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@
4646
#define INIT_CMD0_RETRY_US (100UL)
4747
#define R1_POLLING_RETRY_US (100 * US_PER_MS)
4848
#define SD_DATA_TOKEN_RETRY_US (100 * US_PER_MS)
49+
#if defined(SD_LONG_BUSY_WAIT)
50+
#define SD_WAIT_FOR_NOT_BUSY_US (500 * US_PER_MS)
51+
#else
4952
#define SD_WAIT_FOR_NOT_BUSY_US (250 * US_PER_MS)
53+
#endif
5054

5155
#define SD_BLOCK_READ_CMD_RETRY_US (100UL)
5256
#define SD_BLOCK_WRITE_CMD_RETRY_US (100UL)

radio/src/targets/taranis/hal.h

+3
Original file line numberDiff line numberDiff line change
@@ -2700,6 +2700,9 @@
27002700
#endif
27012701

27022702
#define STORAGE_USE_SDCARD_SPI
2703+
#if defined(RADIO_GX12)
2704+
#define SD_LONG_BUSY_WAIT (true)
2705+
#endif
27032706

27042707
#define SD_GPIO_PIN_CS GPIO_PIN(GPIOB, 12) // PB.12
27052708
#define SD_GPIO_PIN_SCK GPIO_PIN(GPIOB, 13) // PB.13

0 commit comments

Comments
 (0)