how to use timer ISR?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

HI, everybody.

   

now I am use cy7c68013 as a controler and transfer to a sampe system. I use the CPU in 68013 to control ADc. In other to sure the timing of sample, I use a timer.here in my ISR declare for timer 1:

   

void Timer_RP_Interrupt() interrupt TMR1_VECT

   

But, after download fireware, I found timer ISR can't work. I checked the TRM of 68013 and searched on the internet, I found the keil will ingore the interrupt TMR1_VECT becase of  #pragma NOIV, which tells keil do not generate interrupt vectors, so keil will use USBJMPTB.OBJ to indicate the entry address for usb interrupt. But in USBJMPTB.OBJ , it doesn't tell keil the entry address for timer interrput. and I don't konw how to re-code the USBJMPTB.OBJ.

   

my question is :how can i use the timer and code a ISR for it. how to code the usbjmptb?

   

thanks for you read. the best wishes for you! 

0 Likes
1 Solution
Anonymous
Not applicable

 Hi,

   

#pragma NOIV affects only the source file on which it is added. Make a new source file for your timer ISR. It will work.

   

Regards,

   

Gayathri

View solution in original post

0 Likes
7 Replies
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

 Hi,

   

       See the attached documents.

0 Likes
Anonymous
Not applicable

Hi,

   

     We have an Application note describing timer interrupts. Please download it from  http://www.cypress.com/?rID=12919.

   

Thanks

   

Prajith

0 Likes
Anonymous
Not applicable

firstly, thanks for your help.

   

i am sorry that i didn't express my question clearly. actually, i konw how to use keil's keyword interrupt .what confuses me  is i need usb interrupt, like endpoint interrupt ,and timer  interrupt. but 68013 use usbjmptb.a51 to indicate the entry address for usb interrupt, but not indicate timer interrupt entry address in this file. so, when i use usb interrupt ,i can't use timer interrupt. i really want know how to use usb interrupt and timer interrupt together.

   

thanks again for your favou

0 Likes
Anonymous
Not applicable

 It is possible to combine both USB and Timer interrupts in a single project. Download associated project from above link which has hooks for all USB interrupts. For Endpoint interrupts, modify ISRs ISR_Ep1out,ISR_Ep1,ISR_Ep2inout...available in periph.c, code example http://www.cypress.com/?docID=27502 demonstrates usage of Endpoint interrupts. Attached project performs dataloopback on EP1OUT-EP1IN endpoints based on Endpoint interrupts in addition to Timer application explained in AN1193.

   

Thanks

   

Prajith

0 Likes
Anonymous
Not applicable
0 Likes
Anonymous
Not applicable

 Hi,

   

#pragma NOIV affects only the source file on which it is added. Make a new source file for your timer ISR. It will work.

   

Regards,

   

Gayathri

0 Likes
Anonymous
Not applicable

 HI

   

thanks a lot ! It is a very simple but effective idea for using timer interrupt and USB interrupt at a same time! and thanks for PRJJ too!

0 Likes