mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 01:58:32 -04:00
Basic demo up and running.
This commit is contained in:
parent
4953c7d030
commit
5ff84b9869
4 changed files with 99 additions and 17 deletions
|
@ -48,6 +48,7 @@
|
|||
*/
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
#define portPRESCALE_VALUE 64
|
||||
#define portPRESCALE_REG_SETTING ( 5 << 8 )
|
||||
|
@ -69,14 +70,16 @@ const unsigned portSHORT usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRES
|
|||
MCF_PIT0_PCSR = ( portPRESCALE_REG_SETTING | MCF_PIT_PCSR_PIE | MCF_PIT_PCSR_RLD | MCF_PIT_PCSR_EN );
|
||||
MCF_PIT0_PMR = usCompareMatchValue;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void __attribute__ ((interrupt)) __cs3_isr_interrupt_127(void)
|
||||
{
|
||||
MCF_INTC0_INTFRCH &= ~( 1UL << 31UL );
|
||||
}
|
||||
|
||||
void __attribute__ ((interrupt)) __cs3_isr_interrupt_119(void)
|
||||
void __attribute__ ((interrupt)) __cs3_isr_interrupt_119( void )
|
||||
{
|
||||
MCF_PIT0_PCSR |= MCF_PIT_PCSR_PIF;
|
||||
MCF_INTC0_INTFRCH |= ( 1UL << 31UL );
|
||||
vTaskIncrementTick();
|
||||
|
||||
#if configUSE_PREEMPTION == 1
|
||||
{
|
||||
taskYIELD();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue