ESP32 4Bit SD-Mode Init problem

Any bugs you encounter with Flowcode should be discussed here.
stefan.erni
Valued Contributor
Posts: 1012
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 193 times
Been thanked: 217 times

ESP32 4Bit SD-Mode Init problem

Post by stefan.erni »

Hi Ben

I get a problem to compile to hex When I'm use the the 4Bit SD-Mode Init command

Normally this works without a problem with the 4Bit SD-Mode Init command of the card.
I do the same as with the other programs. But this one don't compile. I have already tried many things

Code: Select all

C:/Users/stefan.erni/Desktop/esp-idf-2/mtxesp32s_sdkconfig/main/esp-project.c:277:21: error: implicit declaration of function 'FC_CAL_FILE_ReadByteFromFile_2' [-Werror=implicit-function-declaration]
  277 |     if (FCL_DATA_BYTE == 0)

Attachments
Test_SD_post_new.fcfx
(20.26 KiB) Downloaded 39 times

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: ESP32 4Bit SD-Mode Init problem

Post by medelec35 »

Hi Stefan.
Test_SD_post_new.fcfx compiles for me OK.
Have you got all the latest full library updates?
Martin

stefan.erni
Valued Contributor
Posts: 1012
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 193 times
Been thanked: 217 times

Re: ESP32 4Bit SD-Mode Init problem

Post by stefan.erni »

Hi Martin

Very good that it works for you.
I changed the menu config and now it works again.
I test far and append string works perfect.
I still have problems with writing the sector.
The file remains empty.
Attachments
2025-01-27_16-45-14.PNG
2025-01-27_16-45-14.PNG (23.4 KiB) Viewed 8845 times
2025-01-27_16-39-50.PNG
2025-01-27_16-39-50.PNG (6.69 KiB) Viewed 8845 times
Test_SD_post_new.fcfx
(46.45 KiB) Downloaded 37 times

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: ESP32 4Bit SD-Mode Init problem

Post by medelec35 »

Hi Stefan, thank you.
I have added the bug to bugs list.
It will be sorted ASAP
Martin

stefan.erni
Valued Contributor
Posts: 1012
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 193 times
Been thanked: 217 times

Re: ESP32 4Bit SD-Mode Init problem

Post by stefan.erni »

Hi Martin

Thank you,

First the good news. I have done several 12 hour long tests, saved continuously, and have not a single problem.

But a few commands don't seem to work properly yet
- local array append give problems to compile, you can see when you activate them in the macro, but with global array it compiles.
2025-01-28_10-54-45.PNG
2025-01-28_10-54-45.PNG (29.26 KiB) Viewed 8814 times
- AppendByteArray is appending just one letter
2025-01-28_14-03-18.PNG
2025-01-28_14-03-18.PNG (24.19 KiB) Viewed 8814 times
2025-01-28_14-01-52.PNG
2025-01-28_14-01-52.PNG (20.22 KiB) Viewed 8814 times
Would it be possible to make the change to the next sector much faster?
2025-01-28_14-21-59.PNG
2025-01-28_14-21-59.PNG (54.86 KiB) Viewed 8814 times
Attachments
Test_SD_post_new.fcfx
(50.6 KiB) Downloaded 36 times

stefan.erni
Valued Contributor
Posts: 1012
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 193 times
Been thanked: 217 times

Re: ESP32 4Bit SD-Mode Init problem

Post by stefan.erni »

Hi Martin

There is still a small problem. I use the option long filename support. This option must also be selected in the menu. If this is not done, my test will not work for you. I have changed the longname to a short in the test program.

program with shortname:
Test_SD_post_ShortName.fcfx
(50.38 KiB) Downloaded 36 times
with shortname:
2025-01-30_18-44-09.PNG
2025-01-30_18-44-09.PNG (5 KiB) Viewed 8784 times
program with longname need a change in menue:
2025-01-30_18-37-28.PNG
2025-01-30_18-37-28.PNG (5.41 KiB) Viewed 8784 times
2025-01-30_17-19-16.PNG
2025-01-30_17-19-16.PNG (32.98 KiB) Viewed 8784 times

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: ESP32 4Bit SD-Mode Init problem

Post by medelec35 »

Hi Stefan.
My plan is I will be looking into this tomorrow.
Martin

stefan.erni
Valued Contributor
Posts: 1012
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 193 times
Been thanked: 217 times

Re: ESP32 4Bit SD-Mode Init problem

Post by stefan.erni »

Hi Martin

I downloaded the component from the Flowcode website and looked at it.
But this is probably an old version. Can you please give me the current version?

stefan.erni
Valued Contributor
Posts: 1012
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 193 times
Been thanked: 217 times

Re: ESP32 4Bit SD-Mode Init problem

Post by stefan.erni »

Hi Martin

I have looked at the component and WriteByteToBuffer, ReadFileLength do not work and are perhaps not yet implemented,
or I still don't understand exactly how it works.
During the test I did not notice any difference if I change the clock from 20MHz to 40Mhz.
Also no difference if I choose 4bit or 1bit mode. Both equally fast


from component WriteByteToBuffer:
2025-02-20_17-13-38.PNG
2025-02-20_17-13-38.PNG (25.65 KiB) Viewed 5418 times
from component ReadFileLength:
2025-02-20_17-14-16.PNG
2025-02-20_17-14-16.PNG (32.06 KiB) Viewed 5418 times

stefan.erni
Valued Contributor
Posts: 1012
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 193 times
Been thanked: 217 times

Re: ESP32 4Bit SD-Mode Init problem

Post by stefan.erni »

Hi Martin

Some news about the sd-card problem?

Post Reply