stmhal: Fix bug where negative delay/udelay lead to huge delays.
stmhal: Fix bug where negative delay/udelay lead to huge delays.

A negative ms/us is now treated as a delay of 0 ms/us.  This patch also
improves the calibration of udelay.

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