Hello Team,
I want to integrate the micro sd card reader for my application to detect/read/write/erase of the SD card.
Which driver should i use to proceed ahead 1. SDCD1 or 2 MMCDriver ?
Details of hardware is using.
STM32 Board :: STM32F4029disc-1
MicroSD Card Adaptor :: CATALEX MicroSD Card Adaptor. This SD Card reader has 6 pins (CS,MISO,MOSI,SCK,VCC,GND).
What should be the connection between STM32 board and this SD Card adaptor ?
SD Card Integration || MicroSD Card Adaptor || STM32F4029disc-1
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: SD Card Integration || MicroSD Card Adaptor || STM32F4029disc-1
Hi,
That adapter requires an SPI port not SD/MMC ones. The driver you need is "MMC_SPI" which wraps the SPI port driver. An example is in RT-STM32F103-OLIMEX_STM32_P103-FATFS.
Giovanni
That adapter requires an SPI port not SD/MMC ones. The driver you need is "MMC_SPI" which wraps the SPI port driver. An example is in RT-STM32F103-OLIMEX_STM32_P103-FATFS.
Giovanni
Re: SD Card Integration || MicroSD Card Adaptor || STM32F4029disc-1
Hello Sir,
In the file "chibios203/os/various/fatfs_bindings/fatfs_syscall.c" there is include present "ff.h" and at the time of compilation it is saying "ff.h" no such file or directory.
In the file "chibios203/os/various/fatfs_bindings/fatfs_syscall.c" there is include present "ff.h" and at the time of compilation it is saying "ff.h" no such file or directory.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: SD Card Integration || MicroSD Card Adaptor || STM32F4029disc-1
Hi,
It is part of FatFS, you need to unzip it under /ext
GiovanniHi,
It is part of FatFS, you need to unzip it under /ext
GiovanniHi,
Re: SD Card Integration || MicroSD Card Adaptor || STM32F4029disc-1
Hello Sir,
This issue is solved.
I want to know about the mapping of pins between MMC driver and SPI ?
I mean MMC driver is using which SPI whether SPI1 or SPI2 or any other for STM32f429 disc board ?
This issue is solved.
I want to know about the mapping of pins between MMC driver and SPI ?
I mean MMC driver is using which SPI whether SPI1 or SPI2 or any other for STM32f429 disc board ?
Re: SD Card Integration || MicroSD Card Adaptor || STM32F4029disc-1
Hello Sir,
mmcIsCardInserted(&MMCD1) always return TRUE, whether SD is available or not doesn't matter.
What may be the root cause for this ?
mmcIsCardInserted(&MMCD1) always return TRUE, whether SD is available or not doesn't matter.
What may be the root cause for this ?
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: SD Card Integration || MicroSD Card Adaptor || STM32F4029disc-1
Look in board.c, there is a function to be implemented for card detection, the implementation depends on where you connect the card detection pin of your connector, usually a free GPIO pin, you may need a pull-up resistor too.
Giovanni
Giovanni
Re: SD Card Integration || MicroSD Card Adaptor || STM32F4029disc-1
Hello SIr,
Now I have understood why "mmcIsCardInserted" function returns always true.
Now I have added a gpio to detect the card insertion/remove event. But now the issue is coming in mmcConnect().
It is going in infinite while loop in wait function which is called from "send_hdr()".
Can you please suggest the steps in order to established the communication from MCU to SD Card via chibios.
Now I have understood why "mmcIsCardInserted" function returns always true.
Now I have added a gpio to detect the card insertion/remove event. But now the issue is coming in mmcConnect().
It is going in infinite while loop in wait function which is called from "send_hdr()".
Can you please suggest the steps in order to established the communication from MCU to SD Card via chibios.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: SD Card Integration || MicroSD Card Adaptor || STM32F4029disc-1
Apparently the card is not answering, the cause could be anything, I can't tell from here.
Consider that the driver could not support all kind of cards, it is quite old and modern high speed cards could not work at all in SPI mode.
Giovanni
Consider that the driver could not support all kind of cards, it is quite old and modern high speed cards could not work at all in SPI mode.
Giovanni
Who is online
Users browsing this forum: No registered users and 42 guests