你看看这两个下面两个函数:
HAL_SD_ErrorTypedef HAL_SD_CheckWriteOperation(SD_HandleTypeDef *hsd, uin ...
你好,这个最新的固件库 v1.6版本里面已经木有你所说的那两个函数了,
在 v1.6 版本之前是有的,但是在 v1.6 版本里面已经找不到了 这两天也是遇到同样的问题,我在想用DMA的中断是否可以呢? /**
* @briefReads block(s) from a specified address in a card. The Data transfer
* is managed by DMA mode.
* @note This API should be followed by a check on the card state through
* HAL_SD_GetCardState().
* @note You could also check the DMA transfer process through the SD Rx
* interrupt event.
* @paramhsd: Pointer SD handle
* @parampData: Pointer to the buffer that will contain the received data
* @paramBlockAdd: Block Address from where data is to be read
* @paramNumberOfBlocks: Number of blocks to read.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_SD_ReadBlocks_DMA(SD_HandleTypeDef *hsd, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks)
这个是在库文件找到的,当用HAL_SD_GetCardState().返回的结果总是4 HAL_SD_CARD_TRANSFER = 0x00000004U,/*!< Card is in transfer state */
gdszyj 发表于 2017-4-7 09:45
/**
* @briefReads block(s) from a specified address in a card. The Data transfer
* is ...
我目前使用的查询貌似,dma 模式还没有去研究,除非把他替换为 v1.6 之前的版本就可以使用 dma 模式了, hpdell 发表于 2017-4-7 11:06
我目前使用的查询貌似,dma 模式还没有去研究,除非把他替换为 v1.6 之前的版本就可以使用 dma 模式了, ...
刚才试了下查询的方法,速度能够达到1M每秒,但是拷贝进去以后会出现乱码的现象,再次拷贝出来说是文件损坏。
/* Write block(s) in DMA transfer mode */
if(HAL_SD_WriteBlocks(&hsd,buf, blk_addr , blk_len,0xffff) == HAL_OK){
ret = USBD_OK;
} 我这边使用F411的芯片,也发生了同样的现象,850K到1M的速度,但是会乱码,请问这个问题有解决吗? Gery_xia 发表于 2017-8-31 16:39
我这边使用F411的芯片,也发生了同样的现象,850K到1M的速度,但是会乱码,请问这个问题有解决吗? ...
你参考 H7 历程的 sd 卡 dma 代码就可以解决 hpdell 发表于 2017-8-31 22:21
你参考 H7 历程的 sd 卡 dma 代码就可以解决
H7中的哪个例程?搞了好久还是没能解决,请帮忙指点指点 Gery_xia 发表于 2017-9-25 19:10
H7中的哪个例程?搞了好久还是没能解决,请帮忙指点指点
看看这个里面的,我已经上传了,
https://www.stmcu.org.cn/module/forum/forum.php?mod=viewthread&tid=611125&page=2#pid2285905
在11楼
页:
1
[2]