very slick! Do you have any more info on your port/project? Ive been looking forward to fatfs on Maple for a while. We would add anything using it to the projects page for sure!
Has any user created a SD memory shield/library from the Arduino to the Maple?
(149 posts) (39 voices)-
Posted 5 years ago #
-
It isn't much of a port, just got his program up and running. Read, write, copy etc. seemed to work. But I can give some more details. Tomorrow, it's 23.20 o'clock. Time to sleep.
Posted 5 years ago # -
Quote: "But I can give some more details" ...
Questions: After you get your sleep.
What SD shield did you use?
Did you have to modify it for the Maple?
Will a SD to micro SD converter card work with this shield?
What brand micro SD card are you using?
What is the max. GB the micro SD card will support?
On the software, what is your SPI clock set for?
I am correct in saying that "FATFS" is an ARM port instead of an Arduino port?
Posted 5 years ago # -
> Quote: "But I can give some more details" ...
> Questions: After you get your sleep.That was the plan. But I've had a lot to do at work today so not so much time to spare.
> What SD shield did you use?
> Did you have to modify it for the Maple?
> Will a SD to micro SD converter card work with this shield?I didn't use a shield, just a SD to micro SD converter with a soldered pinhead on.
> What brand micro SD card are you using?
SanDisk, one 1GB micro SD, and a small test with a 4GB micro SDHC which also seemed to work.
> What is the max. micro SD card supported?
I don't know. But a quick google on SDHC indicates that 32GB is maximum (but maybe it's a 4GB limit for this library, don't know).
> On the software, what is your SPI clock set for?
I don't know that either, if I recall correctly it was the slowest, but that sounds a little strange.
But a test with a 5MB byte file was about 1200 kB/sec for write and about 1400 kB/sec for read.> I am correct in saying that this is an ARM port instead of an Arduino port?
Well. It's not an Arduino port. But most part of FatFS i pretty architecture independent, it's mostly the SD-card communication that is.
What I did was just to define the correct ports and pins to get Martin's testprogram (for stm32) to run on the Maple, and changed his linker script to work with the Maple bootloader.
Today I tried to modify the sd-part to use libmaple instead of ST's STM32-lib, and got it to compile at least (no link. no run). So I think it's not so much work to get the low level stuff up and running. Then there's the job to get it up to a Arduino-ish interface level (and thats probably not me...)
I don't know if this is the way to go for a SD-library. I just tried to get some different stuff to run on the Maple. For fun, and it is (fun).
Posted 5 years ago # -
Quote: "Then there's the job to get it up to a Arduino-ish interface level (and thats probably not me...)"
Reply: Unless you are Perry Hung, having to port to the Maple's SPI "Arduino-ish interface" could be a problem.
Posted 5 years ago # -
leaflabandy, Shouldn't be that hard! I should find one of my spare SD card adapters and try to port things over.
Posted 5 years ago # -
If the STM32F SPI peripherals are really horrible (and I don't know that they are, so please don't assume that's what I'm saying), it would be perfectly feasible to 'bit bang' SPI.
Could even use a Timer to generate the SPI clock, and 'old-school' Parallel-In/Serial-Out (PISO)shift registers for high perfomance(after all, that's pretty much what SPI is).
Posted 5 years ago # -
Kinda makes me wonder why the leafblowers are bit banging the I/O eg I2C, serial(no DMA) and maybe SPI? DMA is built right on the STM chip. Why doesn't Leaflabs use it? It should be much faster than bit banging.
Posted 5 years ago # -
Well, I have no inside knowledge of LeafLabs, but bit-banged I/O, if it can be at a reasonable speed, should be much easier to debug than hardware. Hardware is a bit binary (puns? sorry) - often, it either works, or it doesn't.
With bit-banging, the timing of each edge could be inspected without fancy hardware. An entire pulse-train could be recorded, giving a DIY logic analyser. Further, one could use one Maple to "do the bit banging", and a second Maple as a "test probe/logic analyser".
I'd regard having both hardware and bit-banged implementations of I/O as useful features.
I was very relibly informed about 15 months ago that STM32F I2C was broken. I haven't combed through the erata, so I don't know if it's been fixed since then. I wasn't too put off as I2C is slow enough to bit bang, or speed up with a shift register (or two).
I think DMA will only make a significant difference to I2C or SPI if there is plenty of I/O to keep it busy, and the core is quite heavily loaded. Put another way, an STM32F could spend over 50% of its time bit-banging I/O, and still come out faster than an ATmega using hardware peripherals. As ARM is f-f-f-fast ;-)
Further, having a soft-I/O library gives more flexibility. For example, when I thought I'd only get good servo control with the Arduino's single 16 bit timer, I was a bit disappointed, but when I realised the interrupt response of the ATmega would support 6 or more sero's (this was before the Arduino's soft-servo library, and I had a different design) I felt much more encouraged.
Summary, I like both, and I'm not just greedy and power mad (little Boolean logic joke there :-)
Posted 5 years ago # -
To be clear, I would like hardware peripherals, and soft I/O is significant a bonus. Not the other way around.
Posted 5 years ago # -
Quote: leaflabandy, Shouldn't be that hard! I should find one of my spare SD card adapters and try to port things over.
Reply: Crenn ... are you having any problems with your SD FATFS conversion?
Posted 5 years ago # -
Quote by leaflabsandy: "Crenn ... are you having any problems with your SD FATFS conversion?"
I haven't started as of yet due to uni being in full swing now. I need to still find a spare Micro SD card adapter to solder to.
Posted 5 years ago # -
Quote: "I need to still find a spare Micro SD card adapter to solder to"
Reply: You came to the right place! If you can think how I can obtain your
address (privately) I will send you one using snail mail.I have it ... go to the Arduino forum board and send me a PM with the
address you want me to send the micro SD converter(s) to. AKA ArduinoAndyPosted 5 years ago # -
I have a few at home sitting around, but if I can't find any, I'll send you an address. And I've seen you in the Maple thread on the Arduino forums.
Posted 5 years ago # -
Oh no ... my cover is blown!
Posted 5 years ago #
Reply »
You must log in to post.