We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have tested Keils RTX Program EX1.c using Lpc2124 using the Debugger and everthing ran OK.
So I modifed the EX1.c Prog for the LPC 2368. 1) Used LPC23xx.h through-out. 2) Removed Startup.s and used lpc2300.s and modifies the SWI Handler as described by Keil. 3) set T1TCR to 0 before os_init.
Started the Debugger and displayed OS-Support-> rtx-kernel it shows: task 1 wait_or " " 0000 0004 36% (ie no delay is shown, wait for event) task 2 wait_delay 2 " " " " 32% (ie no events expected) idle_os_demon 0%
There is no task switching going on.
Looking at Clock dividers the CCLK regularly changes from 48 to 2 MHz and back again...and this appears to me ti be wrong, but cannot find out why. I have a suspicion that the reset handler is being called.
I'm using the Keil Demo V4 uVision on Win XP.
Can any one help me out to locate the problem?
Bonzadog
Removed Startup.s and used lpc2300.s<i/>
why?
you only needed to import SWI_Handler, actually! this step is most likely the reason for your program's resets. have you forgotten that you are using an LPC21xx, not a LPC23xx?
do you really believe you can just build a program with arbitrary startup up code and it will run? why not then use a .s file of a Pentium...?
duh. bcoz pentium is not arm architecture.
duh. bcoz
Oh, yeah.
No i don't believe that. If you read further you would have seen that the task does doest initialied and started so very obvioulsy the startup there.
I used the lpc2300.s and modified it for the SWI Handler, as described in the RTX Doc. startup.d doesn't work as well. I had tried that.
Then then I have been observe that the system seems to go to the reset_handler - perhaps from the timer...
RE-DO : Auto-Translator problem..My apologies! ==============================================
No i don't believe that. If you read further you would have seen that the two tasks in EX1 do get initialied and started so very obviously there is a startup there.
In fact I used the lpc2300.s and modified it for the SWI Handler, as described in the RTX Doc. startup.s doesn't work as well. I had tried that too.
I have seen with the Bebugger that the system seems to go to the reset_handler - perhaps from the timer. I think that the os_wait(2) is the problem area.
No i don't believe that
Nobody asks you to believe anything. The only thing you need to do is start using a proper startup code, followed by addressing of the problem itself.
lpc2300.s is the correct startup code -- supplied by Keil! The Debugger shows that the SWI interrupts used by the RTX work. The original LPC 2164 startup.s does not work with the lpc2368.
There is no such thing as the - ie, one and only - correct startup code!
What Keil provide gives you a basis from which to start in developing something that is appropriate for your particular application - they clearly cannot provide a single file that is "correct" for every possible application!
So, you need to check this lpc2300.s and see if it does everything that is needed for your particular application
Yes, in fact you did. Quote: and I did wrtie that I used the lpc2300.s from keil! do you really believe you can just build a program with arbitrary startup up code and it will run?
Anyway I'll get back to the Debugger to see what is happening.
I guess that you were debugging in the Simulator.
Maybe you can disable the EMC (External Memory Controller) in the LPC2300.s, and then try again.
If the EMC is enabled the startup hangs up - I found that out and set EMC from equ 1 to equ 0 in lpc23xx.s .Thanks anyway.
The problem has now been solved :
The startup ,l pc23cc.s , was OK
But in RTX_Config.c under
#define OS_TINIT() VICVectAddr115 = (U32)os_clock_interrupt; \ was originally set and so I changed it to VICVectAddr5 = (U32)os_clock_interrupt; \ and the timer now gets the required interrupt vector. and the tasks are now switching.
But I'll be taking a closer look at this, though.
Many thanks