Is there anyone with experience with the ARTX166 RTOS and the Infineon XE167. I have problems to get the RTOS working which is caused by the interrupts of the used timers. The interrupt never com and all RTOS functions with a delay hangs. Although the webpage of Keil tells the RTOS is compatible , the RTOS is not for the XE167. I had made a report of this bug to Keil but they never answer me when a update of the RTOS comes. They have commit that there is problem with the XE167 and the use of ARTX166 but still there is no solution. Maybe there is ARTX user who have a work around for this and can give me some information how to get the RTOS running.
Did you remember to tag your code as code?
I'am sorry first time i post a message here But i learn fast. Next piece of code must also be added to get the RTOS working..........
// add define's to AR166_CONFIG.C //
#ifndef GPT12E_KSCCFG #define GPT12E_KSCCFG (*((unsigned int volatile *) 0xFE1C)) #endif #ifndef SCU_SLC #define SCU_SLC (*((unsigned int volatile *) 0xF0C0)) #endif #ifndef SCU_SLS #define SCU_SLS (*((unsigned int volatile *) 0xF0C2)) #endif
// add lock and unlock functions to AR166_CONFIG.C //
void AR166_vUnlockProtecReg(void) { unsigned int uwPASSWORD; SCU_SLC = 0xAAAA; // command 0 SCU_SLC = 0x5554; // command 1 uwPASSWORD = SCU_SLS & 0x00FF; uwPASSWORD = (~uwPASSWORD) & 0x00FF; SCU_SLC = 0x9600 | uwPASSWORD; // command 2 SCU_SLC = 0x0000; // command 3 } // End of function MAIN_vUnlockProtecReg void AR166_vLockProtecReg(void) { unsigned int uwPASSWORD; SCU_SLC = 0xAAAA; // command 0 SCU_SLC = 0x5554; // command 1 uwPASSWORD = SCU_SLS & 0x00FF; uwPASSWORD = (~uwPASSWORD) & 0x00FF; SCU_SLC = 0x9600 | uwPASSWORD; // command 2 SCU_SLC = 0x1800; // command 3; new PASSWOR is 0x00 uwPASSWORD = SCU_SLS & 0x00FF; uwPASSWORD = (~uwPASSWORD) & 0x00FF; SCU_SLC = 0x8E00 | uwPASSWORD; // command 4 } // End of function MAIN_vLockProtecReg
// Modification of os_tmr_init in file // // AR166_CONFIG.C //
/*--------- os_tmr_init -------*/ void os_tmr_init (void) { AR166_vUnlockProtecReg(); GPT12E_KSCCFG = 0x0003; // enable module _nop_(); _nop_(); AR166_vLockProtecReg(); OS_TSET(); OS_TIEN(); OS_TRUN(); #if (OS_ROBIN == 1) os_robin_time = OS_ROBINTOUT; #endif } /* end of os_tmr_init */