stmhal: Reset the timer counter to zero after changing the auto reload.
stmhal: Reset the timer counter to zero after changing the auto reload.

Because if the counter is above the new value of the auto-reload register
then it may be a long time until the timer wraps around.

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