Hello everyone
I am trying to run the periph_sdmmc example from LPCOpen.
Used Hardware is OM13073 Evalboard (LPC43S37) and OM13082 rev. B (General Purpose Shield)
I added the code to initialize the GPIO1_12 to power the SD card (as required on the rev. B Shield).
When calling this function
rc = f_open(&Fil, "HELLO.TXT", FA_WRITE | FA_CREATE_ALWAYS);
I get "Failed with rc=1." on the debug log..
Initilizing the disk works fine with
stat = disk_initialize(fs->drv); /* Initialize the physical drive */
but when it comes to
fmt = check_fs(fs, bsect = 0);
fmt is 3: Disk error
digging a bit more into the library (in the function check_fs(..) )
status = sdmmc_execute_command(pSDMMC, CMD_READ_SINGLE, index, 0 | MCI_INT_DATA_OVER); (line 527 in sdmmc_18xx_43xx.c)
status is 32812 ( MCI_INT_EBE | MCI_INT_DATA_OVER | MCI_INT_CMD_DONE) when trying to read the first sector for information about FAT...
Unfortunately I did not find any information about End-bit error...
If someone knows how to fix this problem, please let me know :smileyhappy:
Best regards
Simon Gerber
Hello,
This end-bit error is sent after CRC bits in order to signal that command is finished. It is intended to received a '1' in this end-bit (index 0) once the read command is sent.
Are you able to check (with an analyzer's aid) if this bit is being sent? There is no information about what could be causing the end-bit to be cleared but you can try to use another SD card.
I've tested the example by using a 4 GB SD card in FAT32 (block size of 512) and it worked without problems.
I hope this helps!
Regards,
Isaac