mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-27 15:56:14 -04:00
Corrected SysTick interval calculation.
This commit is contained in:
parent
cfcad6e78a
commit
7ed94acdff
1 changed files with 1 additions and 1 deletions
|
|
@ -276,7 +276,7 @@ void xPortSysTickHandler( void )
|
||||||
void prvSetupTimerInterrupt( void )
|
void prvSetupTimerInterrupt( void )
|
||||||
{
|
{
|
||||||
/* Configure SysTick to interrupt at the requested rate. */
|
/* Configure SysTick to interrupt at the requested rate. */
|
||||||
*(portNVIC_SYSTICK_LOAD) = configCPU_CLOCK_HZ / configTICK_RATE_HZ;
|
*(portNVIC_SYSTICK_LOAD) = ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL;
|
||||||
*(portNVIC_SYSTICK_CTRL) = portNVIC_SYSTICK_CLK | portNVIC_SYSTICK_INT | portNVIC_SYSTICK_ENABLE;
|
*(portNVIC_SYSTICK_CTRL) = portNVIC_SYSTICK_CLK | portNVIC_SYSTICK_INT | portNVIC_SYSTICK_ENABLE;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue