Please ensure to read the configuration and relevant port sections of the\r
online documentation.\r
\r
- http://www.FreeRTOS.org - Documentation, latest information, license and \r
+ http://www.FreeRTOS.org - Documentation, latest information, license and\r
contact details.\r
\r
- http://www.SafeRTOS.com - A version that is certified for use in safety \r
+ http://www.SafeRTOS.com - A version that is certified for use in safety\r
critical systems.\r
\r
- http://www.OpenRTOS.com - Commercial support, development, porting, \r
+ http://www.OpenRTOS.com - Commercial support, development, porting,\r
licensing and training services.\r
*/\r
\r
TM0EQMK0 = 1; /* INTTM0EQ0 interrupt disable */\r
TM0EQIF0 = 0; /* clear INTTM0EQ0 interrupt flag */\r
\r
- /* Set INTTM0EQ0 level 5 priority */\r
+ #ifdef __IAR_V850ES_Fx3__\r
+ {\r
+ /* Set INTTM0EQ0 level 5 priority */ \r
+ TM0CMP0 = (((configCPU_CLOCK_HZ / configTICK_RATE_HZ) / 2)-1); /* divided by 2 because peripherals only run at CPU_CLOCK/2 */\r
+ }\r
+ #else\r
+ {\r
+ TM0CMP0 = (configCPU_CLOCK_HZ / configTICK_RATE_HZ); \r
+ }\r
+ #endif\r
+\r
TM0EQIC0 &= 0xF8;\r
TM0CTL0 = 0x00;\r
- TM0CMP0 = (((configCPU_CLOCK_HZ / configTICK_RATE_HZ) / 2)-1); /* divided by 2 because peripherals only run at CPU_CLOCK/2 */\r
-\r
TM0EQIF0 = 0; /* clear INTTM0EQ0 interrupt flag */\r
TM0EQMK0 = 0; /* INTTM0EQ0 interrupt enable */\r
TM0CE = 1; /* TMM0 operation enable */\r
; Output: NONE\r
;------------------------------------------------------------------------------\r
\r
-#if 0\r
-\r
- RSEG CODE:CODE\r
-vPortYield:\r
- DI\r
- ADD -0x0C,sp ; prepare stack to save necessary values\r
- st.w lp,8[sp] ; save LP to stack\r
- st.w lp,4[sp] ; save LP to stack\r
- stsr 5,lp\r
- st.w lp,0[sp] ; save PSW to stack\r
- portSAVE_CONTEXT ; Save the context of the current task.\r
- jarl vTaskSwitchContext,lp ; Call the scheduler.\r
- portRESTORE_CONTEXT ; Restore the context of whichever task the ...\r
- ld.w 0[sp],lp ; restore EIPSW\r
- ldsr lp,1\r
- ld.w 4[sp],lp ; restore PIPC\r
- ldsr lp,0\r
- ld.w 8[sp],lp ; restore LP\r
- add 0x0C,sp\r
- RETI\r
-\r
-#else\r
-\r
RSEG CODE:CODE\r
vPortYield:\r
\r
\r
RETI\r
\r
-#endif\r
;------------------------------------------------------------------------------\r
\r
;------------------------------------------------------------------------------\r
#define CG_SECURITY8 0FFH\r
#define CG_SECURITY9 0FFH\r
\r
-; Option Byte definitions\r
-;------------------------------------------------------------------------------\r
-#define CG_OPTION7A 0x00\r
-#define CG_OPTION7B 0x04\r
-#define OPT7C 0x00\r
-#define OPT7D 0x00\r
-#define OPT7E 0x00\r
-#define OPT7F 0x00\r
-\r
; Tick ISR Prototype\r
;------------------------------------------------------------------------------\r
- PUBWEAK `??MD_INTTM0EQ0??INTVEC 608`\r
+ PUBWEAK `??MD_INTTM0EQ0??INTVEC 640`\r
PUBLIC MD_INTTM0EQ0\r
\r
MD_INTTM0EQ0 SYMBOL "MD_INTTM0EQ0"\r
-`??MD_INTTM0EQ0??INTVEC 608` SYMBOL "??INTVEC 608", MD_INTTM0EQ0\r
+`??MD_INTTM0EQ0??INTVEC 640` SYMBOL "??INTVEC 640", MD_INTTM0EQ0\r
\r
;------------------------------------------------------------------------------\r
; portSAVE_CONTEXT MACRO\r
; Output: NONE\r
;------------------------------------------------------------------------------\r
\r
-#if 0\r
-\r
- RSEG CODE:CODE\r
-vPortYield:\r
- DI\r
- ADD -0x0C,sp ; prepare stack to save necessary values\r
- st.w lp,8[sp] ; save LP to stack\r
- st.w lp,4[sp] ; save LP to stack\r
- stsr 5,lp\r
- st.w lp,0[sp] ; save PSW to stack\r
- portSAVE_CONTEXT ; Save the context of the current task.\r
- jarl vTaskSwitchContext,lp ; Call the scheduler.\r
- portRESTORE_CONTEXT ; Restore the context of whichever task the ...\r
- ld.w 0[sp],lp ; restore EIPSW\r
- ldsr lp,1\r
- ld.w 4[sp],lp ; restore PIPC\r
- ldsr lp,0\r
- ld.w 8[sp],lp ; restore LP\r
- add 0x0C,sp\r
- RETI\r
-\r
-#else\r
-\r
RSEG CODE:CODE\r
vPortYield:\r
\r
\r
RETI\r
\r
-#endif\r
;------------------------------------------------------------------------------\r
\r
;------------------------------------------------------------------------------\r
\r
;------------------------------------------------------------------------------\r
COMMON INTVEC:CODE:ROOT(2)\r
- ORG 608\r
-`??MD_INTTM0EQ0??INTVEC 608`:\r
+ ORG 640\r
+`??MD_INTTM0EQ0??INTVEC 640`:\r
JR MD_INTTM0EQ0\r
\r
RSEG NEAR_ID:CONST:SORT:NOROOT(2)\r
DB CG_SECURITY8\r
DB CG_SECURITY9\r
\r
-;------------------------------------------------------------------------------\r
-; set microcontroller option bytes\r
\r
- COMMON INTVEC:CODE:ROOT(2)\r
- ORG 7AH\r
-`OPTBYTES`:\r
- DB CG_OPTION7A\r
- DB CG_OPTION7B\r
- DB OPT7C\r
- DB OPT7D\r
- DB OPT7E\r
- DB OPT7F\r
+ END\r
\r
- END
\ No newline at end of file