2024-06-04 06:09 AM - last edited on 2024-06-04 06:38 AM by Peter BENSCH
Hello
we Have Custom Build PCB Board where we Mounted SD card Interface and Using stm32f4xx_HAL_SD.c Library file in which 512 byte Hard Coded as config.DataBlockSize = SDIO_DATABLOCK_SIZE_512B;, but we have to write Byte means don't block size of 512 Byte.
So as i Went through Transcend Sd Card There they Recommended Something WRITE_BL_PARTIAL , if WRITE_BL_PARTIAL =0 means 512 Byte Block Size and WRITE_BL_PARTIAL =1 means Small Block Size that is 1 Byte. So how we can Enable or Disable WRITE_BL_PARTIAL in stm32f4xx_HAL_SD.c .
Anyone Have Idea how we can do ?
Thank You
2024-06-04 06:40 AM
SD cards are based on NAND flash, where you cannot write individual bytes. You can only access them in blocks.
Regards
/Peter
2024-06-04 07:16 AM
It's a BLOCK DEVICE, want to change a BYTE, read a BLOCK, change the BYTE, and write the modified BLOCK back.
You don't use 128MB device just a BYTE at a time, it's just impractical. You can use FATFS to f_open() / f_write() content in small amounts, by it's incredibly inefficient