Greetings,
I've been trying to get a handle on this for a day, but can't seem to figure it out.
I'm using a TI MSP-TS430PZ100USB and IAR.
Also enabling the 4 Mhz crystal and the 32.7 crysstal.
I have the following for unused interrupts:
#include "msp430f5635.h" #pragma vector = PORT4_VECTOR,PORT3_VECTOR,TIMER2_A1_VECTOR,TIMER2_A0_VECTOR,\ TIMER1_A0_VECTOR, WDT_VECTOR,TIMER0_B1_VECTOR,TIMER0_B0_VECTOR,COMP_B_VECTOR,UNMI_VECTOR,SYSNMI_VECTOR __interrupt void unused_handler(void) { while(1); }
My issue occurs in main() where I have:
while(1) { __no_operation(); __bis_SR_register(LPM0_bits + GIE); //wait for an interrupt __no_operation(); ..... }
After the SR bit setting I immediately end up (according to the disassembly screen) here:
000000 D032 00F0 bis.w #0xF0,SR 000004 3FFF jmp 0x4 000006 DFFF 0000 bis.b @R15+,0x0(R15) 00000A FFFF FFFF and.b @R15+,0xFFFF(R15) 00000E FFFF FFFF and.b @R15+,0xFFFF(R15) 000012 FFFF BFFF and.b @R15+,0xBFFF(R15) 000016 7FFF 7FFF subc.b @R15+,0x7FFF(R15) 00001A FFFF FFFF and.b @R15+,0xFFFF(R15) 00001E FFFF 0000 and.b @R15+,0x0(R15) 000022 0000 ???? 000024 0000 ???? 000026 0000 ???? 000028 0000 ???? 00002A 0000 ???? 00002C 0000 ???? 00002E 0000 ????
I have been coding MSP430F2618s and other variants successfully for years and I'm probably missing something obvious, but would appreciate any help and debugging tips. Let me know if more info is needed.
Thanks.