Reply by Christian Johansen●April 12, 20132013-04-12
I need to store raw data in a SD card at 10 samples per second, with a 64 byte
sample size.
I have most of the project done in assembly but i could only find C code for
communitcation
with MMC card actualy, that I've adapted into SD card(it was really hard to
find documentation though).
That was usefull for me to verify that the hardware is ok, but i really
need an assembly code
for communication with SD card, so that I can add it to the main project.
Could anyone point me to any assembly code for MSP430 communication with SD
card?(using spi interface preferably)
I haven't found any assembly code for that anywhere, even though i've
been looking for a while now.
Al, is there any chance that you could send your code or part of it?
I'm using msp430f1611, mainly because i have leftovers from another
project,
I intend to use it's spi interface, even though the C code i got to work is
currently using bit bang.
Matthias Weingart wrote: > Dan Bloomquist :
>
>>
> Can not acces to that server:
>
> While trying to retrieve the URL: http://lakeweb.net/MSP430/DOS/
> The following error was encountered:
> Connection to 64.150.165.30 Failed
> The system returned:
> (111) Connection refused
I am so tired of my vps provider. We get back from a show in a couple of
weeks, and I'm moving.
Here is a link at code project:
Best, Dan.
Reply by Onestone●April 11, 20132013-04-11
6500rpm is less than 110 revs per second, and 2500RPM just over 40, very
slow by computer standards. What data are you tracking, how many
sensors, of what type, and what data size? I have an SD card app, that
stores raw data at 4500 samples a second th SD card, with a 6 byte
sample size, plus timing data. It can handle 2 sensors in real time
logging mode. 2 issues with SD cards that I experienced.
1. They rerquire CS to be held until the write is completed, which is
unusdual fro SPI peripherals.
2. they have a bascvially indeterminant time to send a response or token.
The implications are that you cannot share an SPI port and log at much
above a snails pace, and at high speeds you don't have time to mess with
FAT management. In addition, to get the absolute maximum data logging
rates the DMA doesn't help, in fact it can get in the way and slow you
down because it steals CPU cycles and inhibits some interrupts while
longer data streams are shifted.
To get the fastest perfroamnce I could the code is all in assembler (but
then my code nearly always is).
Al
Reply by Bob●April 11, 20132013-04-11
Thanks!
--- In m..., Mark Rages wrote: >
> elm-chan's FatFs is an excellent, tightly-coded library for this. It
> provides a good benchmark of resource utilization across doffrent platforms
> here: http://elm-chan.org/fsw/ff/en/appnote.html#memory
>
> The tightest constraint on MSP430 seems to be ram. Using the _FS_TINY
> setting, you need a little over 512 bytes.
>
> If you don't use a file system, there are tricks you can use to output
data
> to the card as you generate it, so that the 512-byte buffer isn't
> necessary. I haven't seen a FAT filesystem that does this.
This is exactly what I needed.
My application is aircraft engine and propeller management and I want to keep
metrics. Things are happening pretty fast at engine 6,500 rpm and prop 2,400 rpm
and I'll have to 'condense' the data. This write-up suggests the
best answer is a basic, serial-stream to a 'pad' style device. . . .
ahhhh, more toys.
The only caveat if you are using the Petite Fatfs is that it cannot create
files, you will need to create the file on the PC first.
HTH.
-Gerard
Reply by Matthias Weingart●April 11, 20132013-04-11
Dan Bloomquist :
>
Can not acces to that server:
While trying to retrieve the URL: http://lakeweb.net/MSP430/DOS/
The following error was encountered:
Connection to 64.150.165.30 Failed
The system returned:
(111) Connection refused
??
M.
Reply by ●April 11, 20132013-04-11
Hi!
FYR - A portable FAT library for MCU app - Circuit Cellar
Source library and Documentation attached!
HF.
Fero
Reply by Dan Bloomquist●April 11, 20132013-04-11
Bob wrote: > Hi,
>
> I've searched the messages but not had any luck finding out how much
memory is needed to support the SD card file system. I think I've got a
reasonable understanding of the two styles of interface at the physical layer.
But often we need some logic to deal with the file system, such as it is.
>
> Suggested sources?
I don't know if what I did is what you are looking for. I plan on a 2.0
release that is more complete this summer. Lots of #ifdefs to make what
you really require. I started by trying to use other libraries but found
them defiant for a 'small' ap. I used MS typedefs in this one where I
should have use the standard defs, but it is really all the same. I
can't imagine getting it much tighter but for a byte or so. Using a DOS
means that your memory is plug and play on a box. I've done this for a
DMAless chip too, not a big deal. But yea, if you go DOS, about stuck
with at least 512 bytes of dedicated ram.
Best, Dan.
Reply by Mark Rages●April 11, 20132013-04-11
elm-chan's FatFs is an excellent, tightly-coded library for this. It
provides a good benchmark of resource utilization across doffrent platforms
here: http://elm-chan.org/fsw/ff/en/appnote.html#memory
The tightest constraint on MSP430 seems to be ram. Using the _FS_TINY
setting, you need a little over 512 bytes.
If you don't use a file system, there are tricks you can use to output
data
to the card as you generate it, so that the 512-byte buffer isn't
necessary. I haven't seen a FAT filesystem that does this.
Regards,
Mark
markrages@gmail
Reply by Bob●April 11, 20132013-04-11
Hi,
I've searched the messages but not had any luck finding out how much memory
is needed to support the SD card file system. I think I've got a reasonable
understanding of the two styles of interface at the physical layer. But often we
need some logic to deal with the file system, such as it is.