Page 1 of 1

SD.begin( ) slow down the program

Posted: Tue Apr 11, 2023 1:01 pm
by Iraton
I'm using a stm32l432kc and I don't know why if i do the SD.begin() in my program the program slow down (normaly is set to 150ms, but after that command slow down to like 4 second), but if i use only the sd in another program (like the example or anything else) it works fine. This is where i begin the sd (https://github.com/lraton/FlopperZiro/b ... n.ino#L116), after that all my code is slowed down. I already asked in the arduino forum (https://forum.arduino.cc/t/sd-begin-slo ... /1113792/1)

Re: SD.begin( ) slow down the program

Posted: Tue Apr 11, 2023 1:14 pm
by fpiSTM
Well if one or more of the libraries you used uses interrupt it could explains this.

Re: SD.begin( ) slow down the program

Posted: Tue Apr 11, 2023 1:20 pm
by Iraton
I have tried to make a program with all the libraries i use in that program, and the same setup(), and i doen't do the problem

Re: SD.begin( ) slow down the program

Posted: Tue Apr 11, 2023 2:06 pm
by ag123
if you are doing write operations, the timeout can be 100 times longer than the typical program times or 250 ms.
and for read 100 ms
https://www.sdcard.org/downloads/pls/
you may want to check the specs.

Re: SD.begin( ) slow down the program

Posted: Tue Apr 11, 2023 4:41 pm
by Iraton
Yes i know thatt when i'm writing it slow down, but if i don't do nothing, only the begin, it slow down all up to like 4 seconds

Re: SD.begin( ) slow down the program

Posted: Tue Apr 11, 2023 5:29 pm
by fpiSTM
If with SD library only it works but not with all then one of the library slow down the begin. Probably due to interrupt.

Re: SD.begin( ) slow down the program

Posted: Tue Apr 11, 2023 7:14 pm
by Iraton
I found thatt the problem is the display.display() function of the ssd1306, now i'm testing another library thta use less memory, but it doesn't work