cancel
Showing results for 
Search instead for 
Did you mean: 

EMMC64G-W525-X01U is not working with STM32F429ZI.

AH_nt
Associate II

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;

   }

6 REPLIES 6

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AH_nt
Associate II
  1. we are presently using divider 250 for data write is already very low.

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.

Do you have a USART that can be used for debug input/output? Enumerate USART and PINs

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

We are using with JTAG on PCB for Debug.

We are using USART for 2 more chipset communication. There is no USART is taken for Debug input/output.

AH_nt
Associate II

We have also used USB_HS.