2020-07-26 11:54 AM
I am reading Data from 8 ADC- ADS8688 and writing to EMMC64G-W525-X01U with Queue of 100 and Block 512 at 1000 sample/sec.
I use below function for data writing and API file is attached below.
HAL_StatusTypeDef HAL_MMC_WriteBlocks(MMC_HandleTypeDef *hmmc, uint8_t *pData, uint32_t BlockAdd, uint32_t NumberOfBlocks, uint32_t Timeout)
It runs for 5 min at 400 sample/sec after that it stops writing data and goes to below error.
else if(__HAL_MMC_GET_FLAG(hmmc, SDIO_FLAG_TXUNDERR))
{
/* Clear all the static flags */
__HAL_MMC_CLEAR_FLAG(hmmc, SDIO_STATIC_FLAGS);
hmmc->ErrorCode |= HAL_MMC_ERROR_TX_UNDERRUN;
hmmc->State = HAL_MMC_STATE_READY;
return HAL_ERROR;
}
2020-07-26 12:18 PM
Those look to be the stock driver files, more interesting would be how you're using them, and how you're initializing the interface.
The error suggests you're not moving data quick enough. Try less aggressive clock on the SDIO, or review the relative clock speeds in the system.
2020-07-31 11:34 AM
hmmc.Instance = SDIO;
hmmc.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING;
hmmc.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE;
hmmc.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE;
hmmc.Init.BusWide = SDIO_BUS_WIDE_1B;
hmmc.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE;
hmmc.Init.ClockDiv = 250;
if (HAL_MMC_Init(&hmmc) != HAL_OK)
{
_Error_Handler(__FILE__, __LINE__);
}
if (HAL_MMC_ConfigWideBusOperation(&hmmc, SDIO_BUS_WIDE_8B) != HAL_OK)
{
_Error_Handler(__FILE__, __LINE__);
}
2.We have not used DS(Data Strobe) pin in design for emmc, SDIO interface, which is shown in below picture.
2020-07-31 11:44 AM
Do you have a USART that can be used for debug input/output? Enumerate USART and PINs
2020-07-31 11:49 AM
We are using with JTAG on PCB for Debug.
2020-07-31 11:54 AM
We are using USART for 2 more chipset communication. There is no USART is taken for Debug input/output.
2020-07-31 11:55 AM
We have also used USB_HS.