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
FAT16 missing Init Timeout
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: FAT16 missing Init Timeout
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- tiny
- Posts: 200
- Joined: Wed Jul 08, 2009 8:29 am
- Has thanked: 51 times
- Been thanked: 93 times
- Contact:
Re: FAT16 missing Init Timeout
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
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
- tiny
- Posts: 200
- Joined: Wed Jul 08, 2009 8:29 am
- Has thanked: 51 times
- Been thanked: 93 times
- Contact:
Re: FAT16 missing Init Timeout
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
Christina