Question
STM32H7 SD CARD got HAL_SD_CARD_RECEIVING
Hi All,
I am using SD card store something log on H743 with mbed. But I encounter a problem which will poll the strange status "HAL_SD_CARD_RECEIVING".
I can initial without any issue. Also can write a shot address and read. But when I write a continuous data for 1MB, it will fail at random address. Please check below:
test_addr=0;
HAL_SD_WriteBlocks(&hsd2, aTxBuffer, test_addr, 1,2000);
if( polling() )//polling state until HAL_SD_CARD_TRANSFER
record_fail();//pass to write
test_addr+=512;
HAL_SD_WriteBlocks(&hsd2, aTxBuffer, test_addr, 1,2000);
if( polling() )//polling state until HAL_SD_CARD_TRANSFER
record_fail();//pass to write
test_addr+=512;
HAL_SD_WriteBlocks(&hsd2, aTxBuffer, test_addr, 1,2000);
if( polling() )//polling state until HAL_SD_CARD_TRANSFER
record_fail();//pass to write
test_addr+=512;
HAL_SD_WriteBlocks(&hsd2, aTxBuffer, test_addr, 1,2000);
if( polling() )//polling state until HAL_SD_CARD_TRANSFER
record_fail(); // <----------fail to write, return HAL_SD_CARD_RECEIVING
test_addr+=512;
HAL_SD_WriteBlocks(&hsd2, aTxBuffer, test_addr, 1,2000);
if( polling() )//polling state until HAL_SD_CARD_TRANSFER
record_fail(); // <----------fail to write, return HAL_SD_CARD_RECEIVINGThe fail address is random. I don't know why cause the issue happen. Does anyone have idea?
Tery
