I used the sdfshc32d.pbp extension and it works great, but if the card socket fails so the card looses connection, the program freezez or, better say starts cycling around a piece of code and does not time out so everything stops working (no hardware SPI used and micro runs at 4 MHz)

I tried to add a loop counter into the code and it seems to be working - if card is missing or it's connector failed it now normally returns and keeps going ignoring the card failure otherwise the timeout did not work - it seems to me it's original timeout counter does not work

...
loopcount var byte
loopcount= 0
waitforcmdtimeout: 'THIS IS ORIGINAL SUBROUTINE LINE IN THE CODE
if loopcount = 255 then
SD_CS = 1
return
endif
loopcount = loopcount +1
...


Maybe someone can advise if and why my approach is not good...

Thank you

Alexey