mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Ensure IAR RL port layer works on devices using two different naming conventions for the interval timer registers.
This commit is contained in:
parent
8c66fdbb8c
commit
caf1fbc899
4 changed files with 38 additions and 1416 deletions
|
@ -76,10 +76,6 @@
|
|||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Hardware includes. */
|
||||
#include "port_iodefine.h"
|
||||
#include "port_iodefine_ext.h"
|
||||
|
||||
/* The critical nesting value is initialised to a non zero value to ensure
|
||||
interrupts don't accidentally become enabled before the scheduler is started. */
|
||||
#define portINITIAL_CRITICAL_NESTING ( ( unsigned short ) 10 )
|
||||
|
@ -239,27 +235,49 @@ const unsigned short usCompareMatch = ( usClockHz / configTICK_RATE_HZ ) + 1UL;
|
|||
/* Use the internal 15K clock. */
|
||||
OSMC = ( unsigned char ) 0x16;
|
||||
|
||||
/* Supply the RTC clock. */
|
||||
RTCEN = ( unsigned char ) 1U;
|
||||
#ifdef RTCEN
|
||||
{
|
||||
/* Supply the interval timer clock. */
|
||||
RTCEN = ( unsigned char ) 1U;
|
||||
|
||||
/* Disable ITMC operation. */
|
||||
ITMC = ( unsigned char ) 0x0000;
|
||||
/* Disable INTIT interrupt. */
|
||||
ITMK = ( unsigned char ) 1;
|
||||
|
||||
/* Disable INTIT interrupt. */
|
||||
ITMK = ( unsigned char ) 1;
|
||||
/* Disable ITMC operation. */
|
||||
ITMC = ( unsigned char ) 0x0000;
|
||||
|
||||
/* Set INTIT high priority */
|
||||
ITPR1 = ( unsigned char ) 1;
|
||||
ITPR0 = ( unsigned char ) 1;
|
||||
/* Clear INIT interrupt. */
|
||||
ITIF = ( unsigned char ) 0;
|
||||
|
||||
/* Clear INIT interrupt. */
|
||||
ITIF = ( unsigned char ) 0;
|
||||
/* Set interval and enable interrupt operation. */
|
||||
ITMC = usCompareMatch | 0x8000U;
|
||||
|
||||
/* Set interval and enable interrupt operation. */
|
||||
ITMC = usCompareMatch | 0x8000U;
|
||||
/* Enable INTIT interrupt. */
|
||||
ITMK = ( unsigned char ) 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Enable INTIT interrupt. */
|
||||
ITMK = ( unsigned char ) 0;
|
||||
#ifdef TMKAEN
|
||||
{
|
||||
/* Supply the interval timer clock. */
|
||||
TMKAEN = ( unsigned char ) 1U;
|
||||
|
||||
/* Disable INTIT interrupt. */
|
||||
TMKAMK = ( unsigned char ) 1;
|
||||
|
||||
/* Disable ITMC operation. */
|
||||
ITMC = ( unsigned char ) 0x0000;
|
||||
|
||||
/* Clear INIT interrupt. */
|
||||
TMKAIF = ( unsigned char ) 0;
|
||||
|
||||
/* Set interval and enable interrupt operation. */
|
||||
ITMC = usCompareMatch | 0x8000U;
|
||||
|
||||
/* Enable INTIT interrupt. */
|
||||
TMKAMK = ( unsigned char ) 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue