Does ISR for 16-bit PSoC 1 Timer have to be written in assembler?

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

cross mob
Anonymous
Not applicable

The reason for this question is that the data sheet for the User Module says, in the example C code:

   

The same code in C is as follows. Note that the interrupt routine must be written in assembly.

   

I note however that the User Module comes with an example project, which uses an ISR written in C, so I am wondering it the statement in the User Module data sheet is simply incorrect.

   

My datasheet is version 2.6, Designer is version 5.4.

   

I note also that the Compiler Guide says:

   

To associate the interrupt handler with an interrupt, add ljmp _name at the interrupt vector in the boot.tpl file.

   

When I look in the boot.tpl file, it says:

   

    org   38h                      ;PSoC Block DCC12 Interrupt Vector
    `@INTERRUPT_14`
    reti

   

so I think the compiler guide is asking me to change this so that it reads:

   

    org   38h                      ;PSoC Block DCC12 Interrupt Vector
    ljmp _MyTimer16Interrupt
    reti

   

 

   

Would that be correct?  If I do this, it builds but with a warning "old-style function definition for `MyTimer16Interrupt'"

   

and it warns me that 'boot.asm' has been modified outside of the editor, do I want to reload it. (Words to that effect.)

   

I can't help thinking that, despite following the instructions, I'm not doing whatever it needs to make it entirely happy.  Any suggestions?

0 Likes
5 Replies