Skip to content

Commit

Permalink
pxa: timer: support WDT use case (at least print WDT hit)
Browse files Browse the repository at this point in the history
  • Loading branch information
uARM-Palm committed Oct 8, 2020
1 parent 0d8373c commit 82994fc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pxa_TIMR.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ static void pxaTimrPrvCheckMatch(struct PxaTimr *timr, uint_fast8_t idx)
{
uint_fast8_t v = 1UL << idx;

if ((timr->OSCR == timr->OSMR[idx]) && (timr->OIER & v))
timr->OSSR |= v;
if (timr->OSCR == timr->OSMR[idx]) {

if (idx == 3 && timr->OWER)
ERR("WDT fires\n");

if (timr->OIER & v)
timr->OSSR |= v;
}
}

static void pxaTimrPrvUpdate(struct PxaTimr *timr)
Expand Down Expand Up @@ -85,8 +91,6 @@ static bool pxaTimrPrvMemAccessF(void* userData, uint32_t pa, uint_fast8_t size,
break;

case 6:
if (val & 1)
return false; //not supported
timr->OWER = val;
break;

Expand Down

0 comments on commit 82994fc

Please sign in to comment.