Hi Stefan.
Apologies for the delay.
I will make this a priority to sort the issue out for you.
ESP32 4Bit SD-Mode Init problem
-
- Matrix Staff
- Posts: 1950
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 624 times
- Been thanked: 656 times
-
- Matrix Staff
- Posts: 1950
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 624 times
- Been thanked: 656 times
Re: ESP32 4Bit SD-Mode Init problem
Hi Stefan.
I have thoroughly looked into this.
Unfortunately, the write functions are not supported, which is the reason they don't work correctly.
Many thanks for bringing this to our attention.
What I'm going to do is check all the functions, and if not supported I will add a tooltip with states its not supported.
I have thoroughly looked into this.
Unfortunately, the write functions are not supported, which is the reason they don't work correctly.
Many thanks for bringing this to our attention.
What I'm going to do is check all the functions, and if not supported I will add a tooltip with states its not supported.
Martin
-
- Valued Contributor
- Posts: 1009
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 192 times
- Been thanked: 217 times
Re: ESP32 4Bit SD-Mode Init problem
Hi Martin
Thanks Martin
if the Sd-card works fast enough, I can do without some modes.
I guess these 3 points would already help me, to store data fast enough.
1. change to the next sector much faster
2. SPI clock should work and set to 50Mhz as an option
3. 4Bit mode working (there is no difference to 1Bit detectable)
Thanks Martin
if the Sd-card works fast enough, I can do without some modes.
I guess these 3 points would already help me, to store data fast enough.
1. change to the next sector much faster
2. SPI clock should work and set to 50Mhz as an option
3. 4Bit mode working (there is no difference to 1Bit detectable)
-
- Valued Contributor
- Posts: 1009
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 192 times
- Been thanked: 217 times
Re: ESP32 4Bit SD-Mode Init problem
Hi Martin
1. change to the next sector much faster
It would already help if this time was reduced by half. It's just a change to the next sector
reduce the "orange" time:
1. change to the next sector much faster
It would already help if this time was reduced by half. It's just a change to the next sector
reduce the "orange" time:
-
- Valued Contributor
- Posts: 1009
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 192 times
- Been thanked: 217 times
Re: ESP32 4Bit SD-Mode Init problem
Hi Martin
I made a second version of my programme. I have used the normal SD card component and am testing it now with this
I have replaced all commands.
i guess it is slow but i can maybe write sectoren with 512byte like by the PIC32
The pins are like this: config the Sd component: add 2 pins and set to high
I made a second version of my programme. I have used the normal SD card component and am testing it now with this
I have replaced all commands.
i guess it is slow but i can maybe write sectoren with 512byte like by the PIC32
The pins are like this: config the Sd component: add 2 pins and set to high
-
- Valued Contributor
- Posts: 1009
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 192 times
- Been thanked: 217 times
Re: ESP32 4Bit SD-Mode Init problem
Hi Martin
I can write sectors with the old SD component, is this also possible with the 4bit SD component?
And can the 4Bit Sd component also work on an STM32?
I can write sectors with the old SD component, is this also possible with the 4bit SD component?
And can the 4Bit Sd component also work on an STM32?
-
- Valued Contributor
- Posts: 1009
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 192 times
- Been thanked: 217 times
Re: ESP32 4Bit SD-Mode Init problem
Hi Martin
any news on the points yet?
1. change to the next sector much faster
2. SPI clock should work and set to 50Mhz as an option
3. 4Bit mode working (there is no difference to 1Bit detectable)
any news on the points yet?
1. change to the next sector much faster
2. SPI clock should work and set to 50Mhz as an option
3. 4Bit mode working (there is no difference to 1Bit detectable)
-
- Valued Contributor
- Posts: 1009
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 192 times
- Been thanked: 217 times
Re: ESP32 4Bit SD-Mode Init problem
Hi Martin
I looked at the writing on the disk again and noticed something even worse.
I always write the same amount of bytes to the disk. Once it takes 54uSec then after 2-3 times it takes 1.12mSec and then also once 3.25mSec.
So 60 times longer. This always happens at regular intervals.
These 3.25mSec rarely but regularly.
It prevents me from being able to sample and save easily with 480Hz (2.08mSec)
Osciloscope I measured the other values separately in order to have the exact duration.
I looked at the writing on the disk again and noticed something even worse.
I always write the same amount of bytes to the disk. Once it takes 54uSec then after 2-3 times it takes 1.12mSec and then also once 3.25mSec.
So 60 times longer. This always happens at regular intervals.
These 3.25mSec rarely but regularly.
It prevents me from being able to sample and save easily with 480Hz (2.08mSec)
Osciloscope I measured the other values separately in order to have the exact duration.
-
- Matrix Staff
- Posts: 1936
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 506 times
- Been thanked: 688 times
Re: ESP32 4Bit SD-Mode Init problem
Hi Stefan,
I'd probably need to see your program to be able to comment.
One thing could be the ESP IDF adding delays. Are you writing byte by byte? It might be better if you can put in an array in one go as the SD mode likely uses DMA to write to the card in a burst and writing byte by byte probably doesn't allow the DMA to run efficiently.
I'd probably need to see your program to be able to comment.
One thing could be the ESP IDF adding delays. Are you writing byte by byte? It might be better if you can put in an array in one go as the SD mode likely uses DMA to write to the card in a burst and writing byte by byte probably doesn't allow the DMA to run efficiently.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Valued Contributor
- Posts: 1009
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 192 times
- Been thanked: 217 times
Re: ESP32 4Bit SD-Mode Init problem
Hi Ben
I will prepare a program to post.
I always append a string with length 147Byte and that works perfectly.
Hour-long recordings succeed.
Writing (append) a string 147Byte without changing sector or cluster takes only 54uSec (2.7Mbyte per Second?)
Writing with changing sector or cluster takes 3.25mSec (45Kbyte per Second?)
Do you remember a few years ago my PIC32 with SD-Card?
I had some problems with the SD-Card speed and you reduced the time to change sector and cluster.
My goal is to sample at 480hz and save to csv. I am making another device that samples at 8Khz and generates wave files
Actual result of recording with 120Samplerate on ESP32 are perfect!
I will prepare a program to post.
I always append a string with length 147Byte and that works perfectly.
Hour-long recordings succeed.
Writing (append) a string 147Byte without changing sector or cluster takes only 54uSec (2.7Mbyte per Second?)
Writing with changing sector or cluster takes 3.25mSec (45Kbyte per Second?)
Do you remember a few years ago my PIC32 with SD-Card?
I had some problems with the SD-Card speed and you reduced the time to change sector and cluster.
My goal is to sample at 480hz and save to csv. I am making another device that samples at 8Khz and generates wave files
Actual result of recording with 120Samplerate on ESP32 are perfect!