diff options
Diffstat (limited to 'os/hal/ports/SAMA/SAMA5D2x')
-rw-r--r-- | os/hal/ports/SAMA/SAMA5D2x/hal_st_lld.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/os/hal/ports/SAMA/SAMA5D2x/hal_st_lld.c b/os/hal/ports/SAMA/SAMA5D2x/hal_st_lld.c index 67f54b3cc..21e7e8df2 100644 --- a/os/hal/ports/SAMA/SAMA5D2x/hal_st_lld.c +++ b/os/hal/ports/SAMA/SAMA5D2x/hal_st_lld.c @@ -92,6 +92,7 @@ void st_lld_init(void) { PIT->PIT_MR = PIT_MR_PIV((SAMA_PIT / OSAL_ST_FREQUENCY) - 1);
PIT->PIT_MR |= PIT_MR_PITEN | PIT_MR_PITIEN;
+ (void) PIT->PIT_PIVR; /* reset PIT PICNT counter */
/* IRQ enabled.*/
aicSetSourcePriority(ID_PIT, SAMA_ST_IRQ_PRIORITY);
|