Marcel

Compiler instruction needed to set the SR at an interrupt routine.

Discussion created by Marcel on Apr 24, 2010
Latest reply on Apr 30, 2010 by Marcel

Hi,

 

We are using MCF51QE128 and MCF51JM128 devices with CWDS for Microcontroller 6.2, build 8127.

 

How can I instruct the compiler to set the Status Register to 0x2700 at an interrupt routine in order to disable all higher priority interrupts. I tried using "__declspec(interrupt:0x2700) void my_handler(void)" as explained in the help file, but the compiler generates the error message "identifier expected" and does not seem to recognize the interrupt keyword.

 

Manually inserting assembly (at the beginning of the interrupt function to set the status register) does not work, because the epilogue instructions are inserted before the assembly and the processor will have sampled for interrupt requests already. Also I do not want to set the CPUCR[IME] bit.

 

Thanks,

Marcel

Outcomes