File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
ports/stm/common-hal/_sdcardio Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -140,9 +140,12 @@ STATIC void check_whole_block(mp_buffer_info_t *bufinfo) {
140
140
STATIC void wait_write_complete (sdcardio_sdiosdcard_obj_t * self ) {
141
141
if (self -> state_programming ) {
142
142
HAL_SD_CardStateTypedef st = HAL_SD_CARD_PROGRAMMING ;
143
- for (int i = 0 ; i < 50000 && st == HAL_SD_CARD_PROGRAMMING ; i ++ ) {
143
+ // This waits up to 60s for programming to complete. This seems like
144
+ // an extremely long time, but this is the timeout that micropython's
145
+ // implementation uses
146
+ for (int i = 0 ; i < 60000 && st == HAL_SD_CARD_PROGRAMMING ; i ++ ) {
144
147
st = HAL_SD_GetCardState (& self -> handle );
145
- HAL_Delay (10 );
148
+ HAL_Delay (1 );
146
149
};
147
150
self -> state_programming = false;
148
151
}
You can’t perform that action at this time.
0 commit comments