Ensure IAR RL port layer works on devices using two different naming conventions for the interval timer registers.
This commit is contained in:
@ -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
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -98,7 +98,7 @@ vPortTickISR:
|
||||
; Install the interrupt handlers
|
||||
|
||||
COMMON INTVEC:CODE:ROOT(1)
|
||||
ORG 56
|
||||
ORG configTICK_VECTOR
|
||||
DW vPortTickISR
|
||||
|
||||
COMMON INTVEC:CODE:ROOT(1)
|
||||
|
Reference in New Issue
Block a user