Hi
I am Unable to generate a interrupt for standard timers in LPC3250 . Are there any changes to make to lpc3250.s and configuration settings in the same lpc3250.s . I am using the keil compiler. I am initialising the Timer clock in TIMCLK_CTRL1 and then T0TCR=0x01; T0CTCR=0x00; TOMCR=0x03;
At this point of debuggig it is running continously without entering into Interrupt Service Routine.
I tried many different settings shown in web but invain
To get any interrupt you must, at least, modify the IRQ entry point in lpc3250.s
. . . IRQ_Addr DCD IRQ_Handler . . . IRQ_Handler B IRQ_Handler . . .
I have enabled the MIC registers also.I kept the same name IRQ_Handler which is lpc3250.s file Is that is the entry point of IRQ Handler .
Ah, you've returned to the original post from http://www.keil.com/forum/18339/
"Is that is the entry point of IRQ Handler ."
Yes - So you must modify that to jump to your IRQ handler.
Hi Thanks How we can do that what is the actual statement i have to keep in .s file
The startup file:
IMPORT YourIrqHandler IRQ_Addr DCD YourIrqHandler ; Jump to YOUR IRQ handler . . . ;IRQ_Handler B IRQ_Handler ; This can now be commented out or removed
Your C file:
__irq void YourIrqHandler(void) { . . . }
It is also not working out .While debugging at each step in keil it is not entering in to Interrupt service routine. Any other ideas please
You now have all the basic elements of what is required.
If it is not going into the interrupt service routine, then it means that either the interrupt controller is not set up correctly or the desired source of the interrupt is not set up correctly (or both are not set up correctly).
You must now analyse what you are witnessing and attempt to determine what is not set up correctly.
I am analyzing the problem ,by using a simple program when i am doing the changes in .s file by importing my isr name and compiling an error is coming in .s file Unknown opcode expecting a opcode or macro for that particular ISR name. Can u give me any suggestions
Since you've given precious little detail, all I can think of saying is that you must correct the problem in your source file.
How come you're getting a build error now? Didn't you put these changes in before and report that the code didn't work?
Hi I just started a new project and then i copied same .s file which have worked out before . But the same error opcode missing Required a opcode or a macro for that particular ISR is coming
Now that Error is solved ,the basic problem i observed is timer is not initialising the count are there any changes to be made in .s file congiguration wizard settings . I tried different settings in that 1 .i disable the pll to power down mode 2. pll bypasses the cco . The external crystal i have used is 16Mhz. RTC is also not used . Can U suggest me any settings in this Configuration wizard of .s file.
"Can U suggest me any settings in this Configuration wizard of .s file."
Ones that match your hardware.
If your CPU is running and you have configured your timer and interrupt controller correctly, then you should be getting interrupts. Playing around with the clock configuration of the startup file would only change the frequencies at which you get the interrupts.
Why not go back to basics? Forget the interrupts for a while, poll the timer and toggle a port pin to see if that part is really operating correctly. When you're happy with that, try your interrupts.
Does keil uvision3 supports LPC3250 .During begining of the project it is not in the list of selected components shown by keil IDE.So i have copied the LPC325X.s file and Ram.ini file and changed some settings accordiing to uvision4 in debug options.For Flash testing it works fine but when i started working on timers the interrupts are not generated Is there any problem with keil uvision3 as i have the full licensed version where as for keiluv4 it is only a simple version
So ... You have written code and it runs as long as you don't use timer interrupts.
What part of the IDE do you think would cause a problem like this?
If the compiler can produce code for the processor (which it can) and you can download code which executes correctly (which I think you've said you can) then, fundamentally, things are working.
It is far more likely to be a problem with how you are configuring the timer and the interrupt controller.