This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A problem at Cortex-m0 run RTX

Dear all,

My project use RTX base on Cortex-m0 lpc1114. The task1 configure the P0_2 as output and control the led, it works. The task2 configure the P0_1 as clkout pin, and configure the clkout connect to main clock, but it doesn't works.

But clkout pin is ok, when i remove the RTX.

Please help me, Thank you!
code:
#include <LPC11xx.h>
#include <RTL.h>

OS_TID id1, id2 ;

__task void task1(void) ;
__task void task2(void) ;

__task void task1(void)
{ id1 = os_tsk_self() ; id2 = os_tsk_create(task2, 1) ;

for(;;) { os_evt_set(0x0002, id2) ; os_evt_wait_or(0x0004, 0xffff) ; LPC_GPIO0->DATA = 0x00000000 ; os_dly_wait(100) ;

}
}

__task void task2(void)
{ for(;;) { os_evt_wait_or(0x0002, 0xffff) ; LPC_GPIO0->DATA = 0x0000000f ; os_dly_wait(100) ; os_evt_set(0x0004, id1) ;

}
}

int main(void)
{ LPC_GPIO0->DIR = 0x0000000f ; LPC_GPIO0->DATA = 0x0000000f ; LPC_IOCON->RESET_PIO0_0 = 0x00000001 ; LPC_IOCON->PIO0_1 = 0x00000001 ; LPC_IOCON->PIO0_2 = 0x00000011 ; LPC_SYSCON->CLKOUTCLKSEL = 0x00000003 ; LPC_SYSCON->CLKOUTDIV = 0x00000001 ; LPC_SYSCON->CLKOUTUEN = 0x00000000 ; LPC_SYSCON->CLKOUTUEN = 0x00000001 ; os_sys_init(task1) ;
}