SD card SDIO

Can someone help me port this library?
User avatar
Pito
Posts: 1626
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: SD card SDIO

Post by Pito » Thu Oct 06, 2016 4:11 pm

In parallel means you use the rtos - above was done with NilRtos, but it could be any rtos you have got handy.
(You may use a standard coding as well but I never have done it that way.)

Task 1 - Producer - sample sensors and write data records to FIFO at required sampling rate (ie 100bytes 500x per second = 50kB/sec)
Do it while FIFO not full (if FIFO properly sized the Task 2 will be emptying it in time despite the write latencies, here the worst case size of the FIFO would be 50kB/sec * 250msecs = 12.5kB, the 250msecs is the max write latency according to the SDcard Specification dated few years back)

Task 2 - Consumer - while FIFO is not empty read data records from FIFO and write data records to SDcard full sdcard's speed (ie 800kB/sec).

Both task run in "parallel" and using 2 semaphores to signal each other.

There is a demo in NilRtos distro how to use the FIFO for writing to an Sdcard. NilRtos is chibios or arduino related (no port to stm32duino planned yet).

https://github.com/greiman/NilRTOS-Ardu ... Logger.ino

When time permits I will create a simple demo in FreeRtos as this is something not well understood among the folk yet :)
Last edited by Pito on Fri Oct 28, 2016 1:04 pm, edited 1 time in total.
Pukao Hats Cleaning Services Ltd.

User avatar
Pito
Posts: 1626
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: SD card SDIO

Post by Pito » Fri Oct 07, 2016 6:08 pm

Pukao Hats Cleaning Services Ltd.

sherinkapotein
Posts: 20
Joined: Thu Apr 06, 2017 6:53 am

Re: SD card SDIO

Post by sherinkapotein » Tue Apr 11, 2017 11:02 am

RogerClark wrote:Just in case this is handy,

I found some code that we may be able to port to Maple to do the SD Card SDIO

https://bitbucket.org/antlabs_dev/fatfs ... 32f103/src

But I better check it works first.
Any update? Do we have a working SDIO library for RET6 and above?

aster
Posts: 110
Joined: Thu Mar 30, 2017 2:41 pm
Location: bella italy
Contact:

Re: SD card SDIO

Post by aster » Mon Jun 05, 2017 8:50 pm

I m quite sure that the well know sdfat already implemented the sdio

stevestrong
Posts: 1813
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: SD card SDIO

Post by stevestrong » Tue Jun 06, 2017 8:22 am

There is already a working version for the STM32generic core: viewtopic.php?f=51&t=2036

Meanwhile I am also trying to implement a non-HAL (libmaple based) version of the SDIO driver for SdFat lib, similar to the Teensy driver.
My progress is documented here, work is ongoing (problems with debugging with Eclipse). Any contribution is welcome!

Post Reply