ok it seems PMW CNTR is not reset as promised in the datasheet, let's fix this for now...

This commit is contained in:
Philippe Teuwen 2019-08-06 23:10:02 +02:00
commit 650dd5855f
2 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@ void SpinDelayUs(int us) {
for (;;) {
uint16_t now = AT91C_BASE_PWMC_CH0->PWMC_CCNTR;
if (now >= (uint16_t)(start + ticks))
if (now == (uint16_t)(start + ticks))
return;
WDT_HIT();