cpu/kinetis_common/timer.c: cleanup and fix the pit timer
cpu/kinetis_common/timer.c: cleanup and fix the pit timer

It simplifies the virtual "count up timer" and improves
the accuracy a little. The LDVAL for the prescaler should
be set as a number of prescaler cycles-1. The virtual
up-counter should be corrected in the isr by +1
(See PIT reference manual). This also fixes a bug where
the timer is not used by xtimer and up-counter does not overflow.

Yonezawa-T2/RIOT,yogo1212/RIOT,Yonezawa-T2/RIOT,kaspar030/RIOT,immesys/RiSyn,MohmadAyman/RIOT,Hyungsin/RIOT-OS,kaleb-himes/RIOT,khhhh/RIOT,FrancescoErmini/RIOT,binarylemon/RIOT,BytesGalore/RIOT,RIOT-OS/RIOT,Hyungsin/RIOT-OS,MohmadAyman/RIOT,l3nko/RIOT,toonst/RIOT,syin2/RIOT,asanka-code/RIOT,backenklee/RIOT,hamilton-mote/RIOT-OS,BytesGalore/RIOT,Yonezawa-T2/RIOT,dailab/RIOT,RIOT-OS/RIOT,asanka-code/RIOT,mtausig/RIOT,mfrey/RIOT,BytesGalore/RIOT,mtausig/RIOT,kaspar030/RIOT,d00616/RIOT,ks156/RIOT,ks156/RIOT,OTAkeys/RIOT,stevenj/RIOT,jfischer-phytec-iot/RIOT,msolters/RIOT,roberthartung/RIOT,dhruvvyas90/RIOT,neumodisch/RIOT,haoyangyu/RIOT,OlegHahm/RIOT,dailab/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,adjih/RIOT,jbeyerstedt/RIOT-OTA-update,OTAkeys/RIOT,lebrush/RIOT,plushvoxel/RIOT,A-Paul/RIOT,MohmadAyman/RIOT,rajma996/RIOT,kb2ma/RIOT,TobiasFredersdorf/RIOT,thomaseichinger/RIOT,wentaoshang/RIOT,rousselk/RIOT,Ell-i/RIOT,toonst/RIOT,yogo1212/RIOT,dkm/RIOT,msolters/RIOT,dkm/RIOT,ks156/RIOT,wentaoshang/RIOT,khhhh/RIOT,jremmert-phytec-iot/RIOT,Josar/RIOT,ks156/RIOT,x3ro/RIOT,FrancescoErmini/RIOT,herrfz/RIOT,haoyangyu/RIOT,brettswann/RIOT,katezilla/RIOT,shady33/RIOT,jbeyerstedt/RIOT-OTA-update,herrfz/RIOT,avmelnikoff/RIOT,rajma996/RIOT,jremmert-phytec-iot/RIOT,jasonatran/RIOT,brettswann/RIOT,avmelnikoff/RIOT,malosek/RIOT,yogo1212/RIOT,mziegert/RIOT,katezilla/RIOT,RubikonAlpha/RIOT,LudwigOrtmann/RIOT,dkm/RIOT,malosek/RIOT,toonst/RIOT,lazytech-org/RIOT,smlng/RIOT,wentaoshang/RIOT,BytesGalore/RIOT,RBartz/RIOT,brettswann/RIOT,kaspar030/RIOT,aeneby/RIOT,rakendrathapa/RIOT,attdona/RIOT,rfuentess/RIOT,kaleb-himes/RIOT,neiljay/RIOT,LudwigOrtmann/RIOT,mziegert/RIOT,Hyungsin/RIOT-OS,katezilla/RIOT,OTAkeys/RIOT,stevenj/RIOT,kbumsik/RIOT,Ell-i/RIOT,beurdouche/RIOT,immesys/RiSyn,asanka-code/RIOT,stevenj/RIOT,kaleb-himes/RIOT,kerneltask/RIOT,josephnoir/RIOT,neiljay/RIOT,basilfx/RIOT,wentaoshang/RIOT,biboc/RIOT,shady33/RIOT,gautric/RIOT,immesys/RiSyn,kaspar030/RIOT,FrancescoErmini/RIOT,kYc0o/RIOT,OlegHahm/RIOT,altairpearl/RIOT,brettswann/RIOT,lebrush/RIOT,herrfz/RIOT,adjih/RIOT,Hyungsin/RIOT-OS,dailab/RIOT,rousselk/RIOT,mziegert/RIOT,alignan/RIOT,aeneby/RIOT,syin2/RIOT,mtausig/RIOT,toonst/RIOT,roberthartung/RIOT,rakendrathapa/RIOT,altairpearl/RIOT,ant9000/RIOT,rajma996/RIOT,l3nko/RIOT,malosek/RIOT,RIOT-OS/RIOT,immesys/RiSyn,kbumsik/RIOT,kbumsik/RIOT,gebart/RIOT,ant9000/RIOT,roberthartung/RIOT,khhhh/RIOT,smlng/RIOT,dailab/RIOT,authmillenon/RIOT,mfrey/RIOT,d00616/RIOT,ant9000/RIOT,stevenj/RIOT,rakendrathapa/RIOT,l3nko/RIOT,kb2ma/RIOT,RubikonAlpha/RIOT,zhuoshuguo/RIOT,brettswann/RIOT,herrfz/RIOT,jbeyerstedt/RIOT-OTA-update,aeneby/RIOT,neiljay/RIOT,cladmi/RIOT,jremmert-phytec-iot/RIOT,jasonatran/RIOT,neumodisch/RIOT,hamilton-mote/RIOT-OS,altairpearl/RIOT,lazytech-org/RIOT,gebart/RIOT,alignan/RIOT,RubikonAlpha/RIOT,beurdouche/RIOT,msolters/RIOT,tfar/RIOT,plushvoxel/RIOT,MohmadAyman/RIOT,lebrush/RIOT,OlegHahm/RIOT,jbeyerstedt/RIOT-OTA-update,OTAkeys/RIOT,plushvoxel/RIOT,roberthartung/RIOT,miri64/RIOT,alignan/RIOT,tfar/RIOT,rajma996/RIOT,A-Paul/RIOT,l3nko/RIOT,neumodisch/RIOT,kYc0o/RIOT,biboc/RIOT,kerneltask/RIOT,rfuentess/RIOT,hamilton-mote/RIOT-OS,kaspar030/RIOT,watr-li/RIOT,aeneby/RIOT,FrancescoErmini/RIOT,neiljay/RIOT,dhruvvyas90/RIOT,MohmadAyman/RIOT,thomaseichinger/RIOT,rakendrathapa/RIOT,rfuentess/RIOT,watr-li/RIOT,binarylemon/RIOT,jbeyerstedt/RIOT-OTA-update,LudwigOrtmann/RIOT,cladmi/RIOT,x3ro/RIOT,lazytech-org/RIOT,d00616/RIOT,backenklee/RIOT,lebrush/RIOT,watr-li/RIOT,rakendrathapa/RIOT,authmillenon/RIOT,RBartz/RIOT,kbumsik/RIOT,LudwigKnuepfer/RIOT,adrianghc/RIOT,josephnoir/RIOT,thomaseichinger/RIOT,kerneltask/RIOT,authmillenon/RIOT,zhuoshuguo/RIOT,gebart/RIOT,wentaoshang/RIOT,beurdouche/RIOT,asanka-code/RIOT,jasonatran/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,dhruvvyas90/RIOT,plushvoxel/RIOT,mziegert/RIOT,MohmadAyman/RIOT,basilfx/RIOT,rfuentess/RIOT,Yonezawa-T2/RIOT,immesys/RiSyn,Yonezawa-T2/RIOT,malosek/RIOT,TobiasFredersdorf/RIOT,watr-li/RIOT,BytesGalore/RIOT,dkm/RIOT,gautric/RIOT,binarylemon/RIOT,zhuoshuguo/RIOT,watr-li/RIOT,kaleb-himes/RIOT,authmillenon/RIOT,mtausig/RIOT,FrancescoErmini/RIOT,khhhh/RIOT,shady33/RIOT,altairpearl/RIOT,herrfz/RIOT,TobiasFredersdorf/RIOT,rousselk/RIOT,A-Paul/RIOT,avmelnikoff/RIOT,biboc/RIOT,kbumsik/RIOT,miri64/RIOT,josephnoir/RIOT,A-Paul/RIOT,Ell-i/RIOT,adrianghc/RIOT,msolters/RIOT,yogo1212/RIOT,mfrey/RIOT,zhuoshuguo/RIOT,backenklee/RIOT,mziegert/RIOT,shady33/RIOT,A-Paul/RIOT,attdona/RIOT,LudwigOrtmann/RIOT,jremmert-phytec-iot/RIOT,haoyangyu/RIOT,toonst/RIOT,thomaseichinger/RIOT,d00616/RIOT,Josar/RIOT,x3ro/RIOT,binarylemon/RIOT,neiljay/RIOT,l3nko/RIOT,RubikonAlpha/RIOT,zhuoshuguo/RIOT,rousselk/RIOT,zhuoshuguo/RIOT,asanka-code/RIOT,gebart/RIOT,shady33/RIOT,l3nko/RIOT,ant9000/RIOT,authmillenon/RIOT,stevenj/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,d00616/RIOT,ant9000/RIOT,basilfx/RIOT,yogo1212/RIOT,gebart/RIOT,thomaseichinger/RIOT,RIOT-OS/RIOT,mziegert/RIOT,jremmert-phytec-iot/RIOT,jasonatran/RIOT,dailab/RIOT,backenklee/RIOT,OTAkeys/RIOT,alignan/RIOT,altairpearl/RIOT,LudwigKnuepfer/RIOT,haoyangyu/RIOT,miri64/RIOT,x3ro/RIOT,dhruvvyas90/RIOT,lebrush/RIOT,hamilton-mote/RIOT-OS,herrfz/RIOT,RIOT-OS/RIOT,plushvoxel/RIOT,dhruvvyas90/RIOT,katezilla/RIOT,lazytech-org/RIOT,mtausig/RIOT,binarylemon/RIOT,attdona/RIOT,lazytech-org/RIOT,biboc/RIOT,rfuentess/RIOT,LudwigOrtmann/RIOT,beurdouche/RIOT,rousselk/RIOT,authmillenon/RIOT,neumodisch/RIOT,cladmi/RIOT,mfrey/RIOT,FrancescoErmini/RIOT,rakendrathapa/RIOT,haoyangyu/RIOT,x3ro/RIOT,basilfx/RIOT,attdona/RIOT,adjih/RIOT,Josar/RIOT,kYc0o/RIOT,rousselk/RIOT,rajma996/RIOT,kb2ma/RIOT,RBartz/RIOT,LudwigKnuepfer/RIOT,LudwigKnuepfer/RIOT,neumodisch/RIOT,brettswann/RIOT,wentaoshang/RIOT,beurdouche/RIOT,malosek/RIOT,attdona/RIOT,malosek/RIOT,neumodisch/RIOT,syin2/RIOT,msolters/RIOT,Ell-i/RIOT,stevenj/RIOT,hamilton-mote/RIOT-OS,katezilla/RIOT,josephnoir/RIOT,adjih/RIOT,josephnoir/RIOT,tfar/RIOT,immesys/RiSyn,jfischer-phytec-iot/RIOT,altairpearl/RIOT,RubikonAlpha/RIOT,cladmi/RIOT,smlng/RIOT,rajma996/RIOT,LudwigOrtmann/RIOT,RBartz/RIOT,kYc0o/RIOT,dkm/RIOT,Josar/RIOT,adrianghc/RIOT,TobiasFredersdorf/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,adrianghc/RIOT,kaleb-himes/RIOT,msolters/RIOT,attdona/RIOT,watr-li/RIOT,adjih/RIOT,smlng/RIOT,avmelnikoff/RIOT,jremmert-phytec-iot/RIOT,smlng/RIOT,binarylemon/RIOT,gautric/RIOT,d00616/RIOT,mfrey/RIOT,haoyangyu/RIOT,Yonezawa-T2/RIOT,jfischer-phytec-iot/RIOT,biboc/RIOT,khhhh/RIOT,avmelnikoff/RIOT,LudwigKnuepfer/RIOT,khhhh/RIOT,roberthartung/RIOT,shady33/RIOT,kb2ma/RIOT,TobiasFredersdorf/RIOT,dhruvvyas90/RIOT,aeneby/RIOT,asanka-code/RIOT,tfar/RIOT,kYc0o/RIOT,OlegHahm/RIOT,jfischer-phytec-iot/RIOT,syin2/RIOT,Josar/RIOT,RBartz/RIOT,syin2/RIOT,kerneltask/RIOT,alignan/RIOT,basilfx/RIOT,kerneltask/RIOT,OlegHahm/RIOT,tfar/RIOT,kb2ma/RIOT,gautric/RIOT,Ell-i/RIOT,Hyungsin/RIOT-OS,gautric/RIOT,backenklee/RIOT,miri64/RIOT,adrianghc/RIOT,jasonatran/RIOT,lebrush/RIOT,cladmi/RIOT,RBartz/RIOT,yogo1212/RIOT,jfischer-phytec-iot/RIOT,RubikonAlpha/RIOT,foss-for-synopsys-dwc-arc-processors/RIOT,ks156/RIOT,miri64/RIOT