This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

microsd does not init

Hi, I followed the process of finit using stm32f4 discovery board (connected to microsd) and Kiel rtx, and received an error on finit but was able to format the microsd using the ARM in the next line. Anybody had such experience?

The only thing I did was change the pin assignment of cd (chip detect) from gpioh15 to gpioe15 because the chip did not have gpioh15.

Thx

Parents
  • I used addon boards purchased from RS to ensure no hardware problems and connected everything which SDIO_STM32F4xx.c referenced i.e.
    D0 to PC.08
    D1 to PC.09
    D2 to PC.10
    D3 to PC.11
    CLK to PC.12
    CMD to PD.02

    But instead of using GPIOH15, I used GPIOE15 (as there is no GPIOH15 on the stmf4 board)
    So I did a search of GPIOH and replaced with GPIOE i.e.:-

    /* Enable GPIOH (card detect), GPIOD (command), GPIOC (data) clock */
    RCC->AHB1ENR |= RCC_AHB1ENR_GPIOEEN | ////////////////////GPIOH originally
    -------------------------------------
    /* Configure PH.15 Card Detect input */
    GPIOE->MODER &= ~0xC0000000; /////////////GPIOH originally
    GPIOE->PUPDR &= ~0xC0000000; /* Pin in Input mode */ //////////GPIOH originally
    -------------------------------------
    /* Reset PH.13 */
    GPIOE->MODER &= ~(3 << 26); /////////////////////GPIOH originally
    -------------------------------------
    if (!(GPIOE->IDR & (1 << 15))) { ////////////////////GPIOH originally

    Where can I find more information on this bit manipulation technique.
    &= ~ looks like a bit selection of twos complement (correct me if I'm wrong)
    Thx

Reply
  • I used addon boards purchased from RS to ensure no hardware problems and connected everything which SDIO_STM32F4xx.c referenced i.e.
    D0 to PC.08
    D1 to PC.09
    D2 to PC.10
    D3 to PC.11
    CLK to PC.12
    CMD to PD.02

    But instead of using GPIOH15, I used GPIOE15 (as there is no GPIOH15 on the stmf4 board)
    So I did a search of GPIOH and replaced with GPIOE i.e.:-

    /* Enable GPIOH (card detect), GPIOD (command), GPIOC (data) clock */
    RCC->AHB1ENR |= RCC_AHB1ENR_GPIOEEN | ////////////////////GPIOH originally
    -------------------------------------
    /* Configure PH.15 Card Detect input */
    GPIOE->MODER &= ~0xC0000000; /////////////GPIOH originally
    GPIOE->PUPDR &= ~0xC0000000; /* Pin in Input mode */ //////////GPIOH originally
    -------------------------------------
    /* Reset PH.13 */
    GPIOE->MODER &= ~(3 << 26); /////////////////////GPIOH originally
    -------------------------------------
    if (!(GPIOE->IDR & (1 << 15))) { ////////////////////GPIOH originally

    Where can I find more information on this bit manipulation technique.
    &= ~ looks like a bit selection of twos complement (correct me if I'm wrong)
    Thx

Children
No data