-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Labels
halHAL-LL driver-related issue or pull-request.HAL-LL driver-related issue or pull-request.needs clarificationNeeds clarification or inputs from the userNeeds clarification or inputs from the usersdSecure Digital interfaceSecure Digital interfacesdmmcSecure Digital input/output Multimedia Card interfaceSecure Digital input/output Multimedia Card interface
Description
In this line, SD_DMATransmitCplt function is not transmit the data, just block in the function. We need fix the code like this:
/**
* @brief DMA SD transmit process complete callback
* @PAram hdma: DMA handle
* @retval None
*/
static void SD_DMATransmitCplt(DMA_HandleTypeDef *hdma)
{
SD_HandleTypeDef* hsd = (SD_HandleTypeDef* )(hdma->Parent);
uint32_t errorstate;
/* Send stop command in multiblock write */
if(hsd->Context == (SD_CONTEXT_WRITE_MULTIPLE_BLOCK | SD_CONTEXT_DMA))
{
errorstate = SDMMC_CmdStopTransfer(hsd->Instance);
if(errorstate != HAL_SD_ERROR_NONE)
{
hsd->ErrorCode |= errorstate;
#if (USE_HAL_SD_REGISTER_CALLBACKS == 1)
hsd->ErrorCallback(hsd);
#else
HAL_SD_ErrorCallback(hsd);
#endif
}
}
/* Disable the DMA transfer for transmit request by setting the DMAEN bit
in the SD DCTRL register */
hsd->Instance->DCTRL &= (uint32_t)~((uint32_t)SDIO_DCTRL_DMAEN);
/* Clear all the static flags */
__HAL_SD_CLEAR_FLAG(hsd, SDIO_STATIC_DATA_FLAGS);
hsd->State = HAL_SD_STATE_READY;
hsd->Context = SD_CONTEXT_NONE;
#if (USE_HAL_SD_REGISTER_CALLBACKS == 1)
hsd->TxCpltCallback(hsd);
#else
HAL_SD_TxCpltCallback(hsd);
#endif
}
Emiya0306
Metadata
Metadata
Assignees
Labels
halHAL-LL driver-related issue or pull-request.HAL-LL driver-related issue or pull-request.needs clarificationNeeds clarification or inputs from the userNeeds clarification or inputs from the usersdSecure Digital interfaceSecure Digital interfacesdmmcSecure Digital input/output Multimedia Card interfaceSecure Digital input/output Multimedia Card interface
Type
Projects
Status
Analyzed