New SdFat library (with and without DMA)

Please do not post requests
stevestrong
Posts: 1837
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: New SdFat library (with and without DMA)

Post by stevestrong » Fri Sep 30, 2016 7:15 am

- open the file as O_RD_WR
- file.rewind();
while(file pointer not at end) {
- peek the char (read pointer will not be incremented) - I think it is the function: file.peek();
- if (char=='3') then: file.write('1'); // pointer will be incremented
- else: increment file pointer
}

VadimEL
Posts: 67
Joined: Sat Aug 13, 2016 1:28 pm

Re: New SdFat library (with and without DMA)

Post by VadimEL » Fri Sep 30, 2016 1:38 pm

stevestrong thanks it's work.

Code: Select all

while (myFile.available())
{
   check = myFile.peek();
   if (check == '2')
   {
    myFile.write('1');
   }
   myFile.read();
}
myFile.close();

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

Re: New SdFat library (with and without DMA)

Post by stevestrong » Fri Sep 30, 2016 1:43 pm

Welcome ;)

User avatar
Manny
Posts: 41
Joined: Wed Dec 09, 2015 3:15 pm

Re: New SdFat library (with and without DMA)

Post by Manny » Mon Oct 10, 2016 6:29 pm

Pito wrote:https://github.com/greiman/SdFat-beta
You can assign what you want, I think it supports two SPIs with two cards in parallel now..
Just tried the SdFat-beta on a couple of boards.

First board was a Olimexino-STM32 with a built in card reader on SPI2, that worked straight out of the box.

Next I tried it on a STM32F103VE (3 SPI) using the card slot on the back of a ILI9341 display wired to SPI2, this time there were compiling errors. There is a typo in line #29 SdSpiSTM32F1.cpp

Code: Select all

static SPIClass m_SPI2(3);
Should be

Code: Select all

static SPIClass m_SPI3(3);
Both set ups gave the same bench results BTW

User avatar
RogerClark
Posts: 7494
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: New SdFat library (with and without DMA)

Post by RogerClark » Mon Oct 10, 2016 8:58 pm

Manny

which file has the typo? and on what line number?

User avatar
Manny
Posts: 41
Joined: Wed Dec 09, 2015 3:15 pm

Re: New SdFat library (with and without DMA)

Post by Manny » Mon Oct 10, 2016 10:54 pm

RogerClark wrote:Manny

which file has the typo? and on what line number?
The typo is in SdFat-Beta, line 29 in SpiDriver/SdSpiSTM32F1.cpp

User avatar
RogerClark
Posts: 7494
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: New SdFat library (with and without DMA)

Post by RogerClark » Tue Oct 11, 2016 2:06 am

Ah OK

Not in my code then ;-)

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

Re: New SdFat library (with and without DMA)

Post by stevestrong » Tue Oct 11, 2016 9:14 am

Manny wrote:The typo is in SdFat-Beta, line 29 in SpiDriver/SdSpiSTM32F1.cpp
I think you should report this bug to greiman's github repo directly.

User avatar
Manny
Posts: 41
Joined: Wed Dec 09, 2015 3:15 pm

Re: New SdFat library (with and without DMA)

Post by Manny » Tue Oct 11, 2016 4:06 pm

stevestrong wrote:
Manny wrote:The typo is in SdFat-Beta, line 29 in SpiDriver/SdSpiSTM32F1.cpp
I think you should report this bug to greiman's github repo directly.
Posted it in the wrong repo but done.

SanjuPrakash
Posts: 6
Joined: Thu Oct 27, 2016 7:07 am

Re: New SdFat library (with and without DMA)

Post by SanjuPrakash » Sun Oct 30, 2016 8:34 am

Hello.

I have tried executing most of the codes present in the victor_pv github page on my STM32F103C8T6 Minimum Development Board. I got SdInfo,Bench and PrintBenchmark working well. LowLatencyLogger compiles and uploads well but nothing gets displayed on the Serial monitor. Could you point out what could be going wrong?

And also could someone tell me what are the other SD codes that are running well on STM32F103C8T6 as i have been stuck on deciphering what to do to get the board to log data onto an SD card as fast as possible.

Post Reply