FAT16 missing Init Timeout

Please add any feature requests for Flowcode version 7 here

Moderator: Benj

Post Reply
User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

FAT16 missing Init Timeout

Post 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

User avatar
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

Post 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.

User avatar
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

Post 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
Data_Logger_Simple_Slow_v6.fcfx
(25.1 KiB) Downloaded 255 times

User avatar
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

Post 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
Data_Logger_Simple_Slow_1.fcfx
(32.41 KiB) Downloaded 329 times

Post Reply