cancel
Showing results for 
Search instead for 
Did you mean: 

sd_diskio.c generated base on sd_diskio_dma_rtos_template_bspv1.c v2.1.4

aa421701136
Associate

cubemx 6.14.0  FW_H7_V1.12.1

sd_diskio.c generated by cubemx, it's not match with the Middlewares\Third_Party\FatFs\src\drivers\sd_diskio_dma_rtos_template_bspv1.c. These are some context in sd_disio.c:

/* USER CODE END Header */

/* Note: code generation based on sd_diskio_dma_rtos_template_bspv1.c v2.1.4
as FreeRTOS is enabled. */

/* USER CODE BEGIN firstSection */

 

In Middlewares/Third_Party/FatFs/src/st_readme.txt:

### V2.1.5/18-08-2023 ###
============================
+ Add LICENSE.md file at the root directory.
+ Fix in disk_initialize() function, the "is_initialized" flag to be set 1 after checking the driver's return value.
- src\diskio.c

+ Fix read/write sector size cast type in USBH_ioctl().
- src\drivers\usbh_diskio_template.c
- src\drivers\usbh_diskio_dma_template.c

+ Fix declaration of the "ret" parameter in SD_read()
- src\drivers\sd_diskio_dma_rtos_template_bspv1.c

+ Set “ReadStatus” variable to zero before calling BSP_SD_ReadBlocks_DMA()
- src\drivers\sd_diskio_dma_template_bspv1.c

+ Fix typo error in SD_Write() where READ_CPLT_MSG is used instead of WRITE_CPLT_MSG
- src\drivers\sd_diskio_dma_rtos_template_bspv1.c
- src\drivers\sd_diskio_dma_rtos_template_bspv2.c

+ Use local variable to store function call return values
- src\drivers\sd_diskio_dma_template_bspv1.c
- src\drivers\sd_diskio_dma_template_bspv2.c
- src\drivers\sd_diskio_dma_rtos_template_bspv1.c
- src\drivers\sd_diskio_dma_rtos_template_bspv2.c

+ Use 32-byte aligned scratch buffer, in SD_read() and SD_write, to match CPU cache alignment.
- src\drivers\sd_diskio_dma_template_bspv1.c
- src\drivers\sd_diskio_dma_template_bspv2.c
- src\drivers\sd_diskio_dma_rtos_template_bspv1.c
- src\drivers\sd_diskio_dma_rtos_template_bspv2.c

### V2.1.4/18-10-2019 ###
============================
+ Fix wrong usage of the "memcpy" in the SD_Write() function
- drivers/sd_diskio_dma_template_bspv1.c
- drivers/sd_diskio_dma_template_bspv2.c
- drivers/sd_diskio_dma_rtos_template_bspv1.c
- drivers/sd_diskio_dma_rtos_template_bspv2.c

 

So, I want sd_diskio.c generate base on sd_diskio_dma_rtos_template_bspv1.c on v2.1.5 or the Middlewares\Third_Party\FatFs\src\drivers\sd_diskio_dma_rtos_template_bspv1.c . There are some error in v2.1.4.   For Example:

v2.1.4: if (!((uint32_t)buff & 0x3))

v2.1.5: if (!((uint32_t)buff & 0x1f))  

0 REPLIES 0