SPI 1 and SDIO speed ?

Discussion created by H.Rick on Mar 7, 2017
Latest reply on Mar 9, 2017 by T J


I tried to run MP3 chip with SDcard on SDIO interface, it's running already but it sounds like the voice is chasing each other, something is late to the other, what do I miss here ?


SPI for MP3 chip, I need :

CLKI/4 for writes, CLKI/7 for reads from SCI.


After reset 1.0x 12.288MHz - 3MHz for writes, 1.7MHz for reads.
After writing CLOCKF, for example at 4.5x 12.288MHz - 13.8MHz for writes, and 8.3MHz for reads.


on STM32 :

hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_16; //72/16 = 4.5MHz <== is that right ? after init

and hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_256; before init


/* SDIO Intialization Frequency (400KHz max) */
#define SDIO_INIT_CLK_DIV ((uint8_t)0xC3)


/* SDIO Data Transfer Frequency */
#define SDIO_TRANSFER_CLK_DIV ((uint8_t)0x9)  // ==72/9 = 8MHz ?
//#define SDIO_TRANSFER_CLK_DIV ((uint8_t)0xE)  // ==72/14 = 4.5MHz ?


Any clues ?