Page 1 of 1
FAT16 missing Init Timeout
Posted: Fri Oct 21, 2016 6:14 pm
by tiny
Is it possible to implement a timeout setting for the FAT16 macro?
Currently the program will hang if the card is not inserted or is not detected.
Thanks!
Christina
Re: FAT16 missing Init Timeout
Posted: Mon Oct 24, 2016 11:15 am
by Benj
Hi Christina,
The FAT component Initialise function should return almost immediately if no card is present. The examples we post usually include a loop which will activley wait for a card to be inserted.
This may have become broken so I will investigate.
To help me replicate your setup could you please post a demo project that shows this problem, or tell me which micro you're using.
Re: FAT16 missing Init Timeout
Posted: Mon Oct 24, 2016 1:20 pm
by tiny
I have adapted the sample program "Data_Logger_Simple_Slow" to my I2C display.
As SD Cardboard I use "Aihasd SPI Micro SD Card Shield Module for Arduino UNO R3 MEGA 2560" from Amazon.
Apparently, the SD card board is that after switching on the SD card is not immediately recognized.
I have extended the query of the return value during the initialization:
255 no card
254 card inserted
237 waiting for card
0 card initialised
So I need to extend the loop to these values.
Thanks for your reply, which has brought me to the idea with the additional query.
Of course it would be helpful if a timeout could solve this additional query already in the macro.
Christina
Re: FAT16 missing Init Timeout
Posted: Mon Oct 24, 2016 2:48 pm
by tiny
I have a workaround here with a timer, which interrupts the loop when the error message is returned and allows the further program sequence.
Christina