mmc_spi problem

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
asdasd
Posts: 18
Joined: Wed May 01, 2019 8:54 am
Has thanked: 9 times

mmc_spi problem

Postby asdasd » Tue Sep 29, 2020 7:49 pm

Hi ,
I want to connect sd card with stm32f103c8(Blue Pill) using chibios191 with (RT-STM32F103-OLIMEX_STM32_P103-FATFS)demo.
But it doesn't work. when I test the SPI pin on oscilloscope there is no signal output on it.
I Have tried to disable JTAG (AFIO->MAPR |=AFIO_MAPR_SWJ_CFG_JTAGDISABLE) noting happend :| ,
also I tried to switch to SPI1 but I failed . :oops:

another question :
does I have to change
(mmc_lld_is card _inserted) and (mmc_lld_is _write_protected ) or it doesn't mater ? :?: :?: :?: :?: :?:

does spi signal send continues trying to connect or it have un event? :?: :!:

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: mmc_spi problem

Postby Giovanni » Tue Sep 29, 2020 9:38 pm

Probably you need to set the alternate function for SPI. Yes, you need to implement those functions if you want card insertion detection.

Giovanni

asdasd
Posts: 18
Joined: Wed May 01, 2019 8:54 am
Has thanked: 9 times

Re: mmc_spi problem

Postby asdasd » Wed Sep 30, 2020 1:46 pm

Giovanni wrote:Probably you need to set the alternate function for SPI. Yes, you need to implement those functions if you want card insertion detection.

Giovanni

thanks for fast replay,
i have set spi pin as alternate and i modify the connecting to be from the shell and every thing is fine in one sd card(kingston 4GB)FAT32. :)
but when i connect anther sd card (ADATA 16GB)FAT32 i can't connecting to it . :!: :!: :!: :!: :!: :!: :!:
can i modifed any thing to connect all sd card? :?:

best regard>.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: mmc_spi problem

Postby Giovanni » Wed Sep 30, 2020 5:45 pm

Hi,

the MMC_SPI driver is like 10 years old, it is possible that recent (high capacity) cards expect a more complex initialization sequence during connection, probably it is not a problem on your side but the driver likely needs an update. Not sure how to proceed.

You may look at the initialization sequence in the SD driver, that one is more updated.

Giovanni


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 6 guests