Changeset 1eae6f2 in rtems


Ignore:
Timestamp:
10/25/22 09:11:20 (11 months ago)
Author:
Dariusz Sabala <dariusz.sabala@…>
Branches:
master
Children:
89ba2a98
Parents:
f6bcf163
git-author:
Dariusz Sabala <dariusz.sabala@…> (10/25/22 09:11:20)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/26/22 09:47:22)
Message:

bsps/arm: fix Cortex-M7 systick reload value

  • see ARM DUI 0646C Arm Cortex-M7 Devices Generic User Guide "The RELOAD value is calculated according to its use. For example, to generate a multi-shot timer with a period of N processor clock cycles, use a RELOAD value of N-1. If the SysTick? interrupt is required every 100 clock pulses, set RELOAD to 99."
  • see routines used in CMSIS project for reference

Close #4746.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/arm/shared/clock/clock-armv7m.c

    rf6bcf163 r1eae6f2  
    9191  interval = (uint32_t) ((freq * us_per_tick) / 1000000);
    9292
    93   systick->rvr = interval;
     93  systick->rvr = interval - 1;
    9494  systick->cvr = 0;
    9595  systick->csr = ARMV7M_SYSTICK_CSR_ENABLE | ARMV7M_SYSTICK_CSR_CLKSOURCE;
Note: See TracChangeset for help on using the changeset viewer.