stmhal: Add retry to SD card init.
stmhal: Add retry to SD card init.

This fixed an issue with a certain SD card sometimes not initialising
first time round.  See issue #822 for related, and thanks to
@iabdalkader for the idea.

ryannathans/micropython,mhoffma/micropython,tralamazza/micropython,MrSurly/micropython,skybird6672/micropython,xyb/micropython,hosaka/micropython,aethaniel/micropython,adafruit/micropython,jmarcelino/pycom-micropython,alex-march/micropython,blazewicz/micropython,adafruit/micropython,warner83/micropython,ceramos/micropython,ganshun666/micropython,utopiaprince/micropython,feilongfl/micropython,mpalomer/micropython,lowRISC/micropython,skybird6672/micropython,kostyll/micropython,mianos/micropython,tuc-osg/micropython,galenhz/micropython,martinribelotta/micropython,selste/micropython,danicampora/micropython,hosaka/micropython,adamkh/micropython,oopy/micropython,jimkmc/micropython,MrSurly/micropython,hosaka/micropython,ryannathans/micropython,bvernoux/micropython,jmarcelino/pycom-micropython,stonegithubs/micropython,EcmaXp/micropython,alex-robbins/micropython,martinribelotta/micropython,feilongfl/micropython,xuxiaoxin/micropython,dinau/micropython,ganshun666/micropython,mianos/micropython,dinau/micropython,feilongfl/micropython,KISSMonX/micropython,xuxiaoxin/micropython,deshipu/micropython,pfalcon/micropython,mhoffma/micropython,EcmaXp/micropython,swegener/micropython,HenrikSolver/micropython,warner83/micropython,EcmaXp/micropython,jmarcelino/pycom-micropython,utopiaprince/micropython,vriera/micropython,omtinez/micropython,paul-xxx/micropython,ernesto-g/micropython,ChuckM/micropython,cloudformdesign/micropython,noahchense/micropython,xuxiaoxin/micropython,bvernoux/micropython,vriera/micropython,dxxb/micropython,hiway/micropython,orionrobots/micropython,lowRISC/micropython,henriknelson/micropython,swegener/micropython,noahwilliamsson/micropython,Vogtinator/micropython,jlillest/micropython,lowRISC/micropython,ganshun666/micropython,orionrobots/micropython,ahotam/micropython,danicampora/micropython,mianos/micropython,suda/micropython,MrSurly/micropython-esp32,Vogtinator/micropython,ernesto-g/micropython,tobbad/micropython,aethaniel/micropython,blmorris/micropython,pozetroninc/micropython,supergis/micropython,puuu/micropython,kostyll/micropython,orionrobots/micropython,matthewelse/micropython,stonegithubs/micropython,kostyll/micropython,utopiaprince/micropython,alex-march/micropython,noahwilliamsson/micropython,matthewelse/micropython,mpalomer/micropython,alex-robbins/micropython,methoxid/micropystat,adamkh/micropython,toolmacher/micropython,firstval/micropython,warner83/micropython,adafruit/circuitpython,chrisdearman/micropython,trezor/micropython,misterdanb/micropython,SungEun-Steve-Kim/test-mp,suda/micropython,rubencabrera/micropython,omtinez/micropython,cwyark/micropython,aethaniel/micropython,lbattraw/micropython,xyb/micropython,noahchense/micropython,omtinez/micropython,pramasoul/micropython,bvernoux/micropython,emfcamp/micropython,neilh10/micropython,danicampora/micropython,deshipu/micropython,kerneltask/micropython,PappaPeppar/micropython,SungEun-Steve-Kim/test-mp,dxxb/micropython,torwag/micropython,infinnovation/micropython,praemdonck/micropython,martinribelotta/micropython,redbear/micropython,dxxb/micropython,AriZuu/micropython,AriZuu/micropython,dhylands/micropython,redbear/micropython,cwyark/micropython,mpalomer/micropython,vitiral/micropython,hosaka/micropython,kerneltask/micropython,ryannathans/micropython,supergis/micropython,adamkh/micropython,adafruit/circuitpython,adafruit/micropython,alex-robbins/micropython,torwag/micropython,mgyenik/micropython,KISSMonX/micropython,firstval/micropython,PappaPeppar/micropython,Timmenem/micropython,mianos/micropython,lowRISC/micropython,vitiral/micropython,alex-march/micropython,emfcamp/micropython,micropython/micropython-esp32,micropython/micropython-esp32,jmarcelino/pycom-micropython,stonegithubs/micropython,ernesto-g/micropython,dhylands/micropython,omtinez/micropython,SHA2017-badge/micropython-esp32,SHA2017-badge/micropython-esp32,dxxb/micropython,tralamazza/micropython,lbattraw/micropython,jlillest/micropython,paul-xxx/micropython,misterdanb/micropython,tdautc19841202/micropython,heisewangluo/micropython,tobbad/micropython,trezor/micropython,heisewangluo/micropython,ruffy91/micropython,redbear/micropython,emfcamp/micropython,ceramos/micropython,blazewicz/micropython,dinau/micropython,ahotam/micropython,selste/micropython,matthewelse/micropython,vitiral/micropython,toolmacher/micropython,warner83/micropython,adafruit/circuitpython,henriknelson/micropython,tuc-osg/micropython,paul-xxx/micropython,jimkmc/micropython,PappaPeppar/micropython,noahchense/micropython,ChuckM/micropython,blazewicz/micropython,dhylands/micropython,TDAbboud/micropython,noahchense/micropython,alex-march/micropython,emfcamp/micropython,HenrikSolver/micropython,mhoffma/micropython,matthewelse/micropython,oopy/micropython,PappaPeppar/micropython,selste/micropython,suda/micropython,ericsnowcurrently/micropython,Vogtinator/micropython,matthewelse/micropython,jlillest/micropython,orionrobots/micropython,turbinenreiter/micropython,rubencabrera/micropython,xhat/micropython,swegener/micropython,xuxiaoxin/micropython,cnoviello/micropython,utopiaprince/micropython,mgyenik/micropython,suda/micropython,SHA2017-badge/micropython-esp32,neilh10/micropython,neilh10/micropython,redbear/micropython,utopiaprince/micropython,pfalcon/micropython,heisewangluo/micropython,adamkh/micropython,xhat/micropython,micropython/micropython-esp32,jmarcelino/pycom-micropython,martinribelotta/micropython,AriZuu/micropython,misterdanb/micropython,vitiral/micropython,skybird6672/micropython,neilh10/micropython,puuu/micropython,blmorris/micropython,heisewangluo/micropython,TDAbboud/micropython,Peetz0r/micropython-esp32,orionrobots/micropython,MrSurly/micropython,micropython/micropython-esp32,chrisdearman/micropython,blazewicz/micropython,mhoffma/micropython,henriknelson/micropython,methoxid/micropystat,tobbad/micropython,tdautc19841202/micropython,deshipu/micropython,MrSurly/micropython,firstval/micropython,drrk/micropython,xyb/micropython,ahotam/micropython,ruffy91/micropython,adafruit/micropython,jimkmc/micropython,methoxid/micropystat,SHA2017-badge/micropython-esp32,MrSurly/micropython-esp32,infinnovation/micropython,turbinenreiter/micropython,pozetroninc/micropython,pramasoul/micropython,cloudformdesign/micropython,EcmaXp/micropython,deshipu/micropython,feilongfl/micropython,paul-xxx/micropython,pozetroninc/micropython,praemdonck/micropython,praemdonck/micropython,pfalcon/micropython,kerneltask/micropython,emfcamp/micropython,lbattraw/micropython,omtinez/micropython,lowRISC/micropython,slzatz/micropython,HenrikSolver/micropython,jimkmc/micropython,cloudformdesign/micropython,rubencabrera/micropython,infinnovation/micropython,MrSurly/micropython-esp32,dinau/micropython,vitiral/micropython,cloudformdesign/micropython,blazewicz/micropython,danicampora/micropython,pozetroninc/micropython,hiway/micropython,ericsnowcurrently/micropython,hiway/micropython,ryannathans/micropython,tobbad/micropython,drrk/micropython,danicampora/micropython,selste/micropython,skybird6672/micropython,turbinenreiter/micropython,kostyll/micropython,hosaka/micropython,TDAbboud/micropython,oopy/micropython,methoxid/micropystat,slzatz/micropython,MrSurly/micropython,ruffy91/micropython,noahwilliamsson/micropython,TDAbboud/micropython,turbinenreiter/micropython,toolmacher/micropython,mgyenik/micropython,vriera/micropython,micropython/micropython-esp32,pramasoul/micropython,KISSMonX/micropython,adamkh/micropython,deshipu/micropython,puuu/micropython,puuu/micropython,noahwilliamsson/micropython,cnoviello/micropython,heisewangluo/micropython,ruffy91/micropython,dmazzella/micropython,lbattraw/micropython,galenhz/micropython,trezor/micropython,henriknelson/micropython,tdautc19841202/micropython,cnoviello/micropython,xyb/micropython,lbattraw/micropython,EcmaXp/micropython,selste/micropython,ceramos/micropython,galenhz/micropython,pramasoul/micropython,mgyenik/micropython,xyb/micropython,cnoviello/micropython,alex-robbins/micropython,xhat/micropython,SungEun-Steve-Kim/test-mp,jlillest/micropython,cwyark/micropython,cloudformdesign/micropython,SungEun-Steve-Kim/test-mp,chrisdearman/micropython,ChuckM/micropython,adafruit/circuitpython,praemdonck/micropython,adafruit/circuitpython,ericsnowcurrently/micropython,noahchense/micropython,galenhz/micropython,torwag/micropython,oopy/micropython,swegener/micropython,KISSMonX/micropython,xhat/micropython,swegener/micropython,dhylands/micropython,bvernoux/micropython,supergis/micropython,adafruit/micropython,praemdonck/micropython,ceramos/micropython,martinribelotta/micropython,slzatz/micropython,AriZuu/micropython,ernesto-g/micropython,xuxiaoxin/micropython,pozetroninc/micropython,KISSMonX/micropython,infinnovation/micropython,drrk/micropython,ganshun666/micropython,ceramos/micropython,chrisdearman/micropython,henriknelson/micropython,paul-xxx/micropython,torwag/micropython,pramasoul/micropython,Vogtinator/micropython,warner83/micropython,skybird6672/micropython,hiway/micropython,supergis/micropython,tralamazza/micropython,AriZuu/micropython,adafruit/circuitpython,MrSurly/micropython-esp32,dmazzella/micropython,stonegithubs/micropython,torwag/micropython,alex-robbins/micropython,ChuckM/micropython,trezor/micropython,ChuckM/micropython,tralamazza/micropython,ahotam/micropython,Timmenem/micropython,trezor/micropython,dxxb/micropython,SungEun-Steve-Kim/test-mp,mgyenik/micropython,mpalomer/micropython,rubencabrera/micropython,Timmenem/micropython,noahwilliamsson/micropython,ernesto-g/micropython,kostyll/micropython,ericsnowcurrently/micropython,cwyark/micropython,MrSurly/micropython-esp32,dhylands/micropython,stonegithubs/micropython,methoxid/micropystat,Peetz0r/micropython-esp32,tobbad/micropython,alex-march/micropython,pfalcon/micropython,ahotam/micropython,drrk/micropython,dinau/micropython,pfalcon/micropython,blmorris/micropython,turbinenreiter/micropython,Peetz0r/micropython-esp32,misterdanb/micropython,xhat/micropython,puuu/micropython,kerneltask/micropython,tdautc19841202/micropython,matthewelse/micropython,drrk/micropython,kerneltask/micropython,toolmacher/micropython,tuc-osg/micropython,SHA2017-badge/micropython-esp32,redbear/micropython,feilongfl/micropython,tdautc19841202/micropython,chrisdearman/micropython,ericsnowcurrently/micropython,Peetz0r/micropython-esp32,mpalomer/micropython,firstval/micropython,vriera/micropython,HenrikSolver/micropython,neilh10/micropython,Peetz0r/micropython-esp32,aethaniel/micropython,cwyark/micropython,ruffy91/micropython,vriera/micropython,bvernoux/micropython,tuc-osg/micropython,dmazzella/micropython,blmorris/micropython,oopy/micropython,rubencabrera/micropython,TDAbboud/micropython,tuc-osg/micropython,jimkmc/micropython,ryannathans/micropython,suda/micropython,misterdanb/micropython,aethaniel/micropython,slzatz/micropython,cnoviello/micropython,ganshun666/micropython,firstval/micropython,supergis/micropython,mhoffma/micropython,Timmenem/micropython,Timmenem/micropython,infinnovation/micropython,PappaPeppar/micropython,Vogtinator/micropython,slzatz/micropython,HenrikSolver/micropython,blmorris/micropython,mianos/micropython,jlillest/micropython,hiway/micropython,galenhz/micropython,dmazzella/micropython,toolmacher/micropython