有一个536的项目,用的是msp430f247的主控芯片,已经将5529的程序完全改为247的程序编译成功,改写过的程序一般情况下能读出数据,偶尔247会不停重启,经过调试发现外部中断部分有问题,5529的一个中断寄存器在247上没有。
在main.c中
01000 #pragma vector=BQ76PL536_OUTPUTS_VECTOR 01001 __interrupt void PORT_ISR(void) 01002 { 01003 /*Read port inputs*/ 01004 01005 // Jump to the corresponding ISR based on the Vector register 01006 pBQ76PL536PortsISR[(BQ76PL536_OUTPUTS_PxIV>>1)](); 01007 01008 01009 // Clear LPM bits from 0(SR) 01010 __bic_SR_register_on_exit(LOW_POWER_MODE); 01011 01012 }
其中bq_pack.h的定义#define BQ76PL536_OUTPUTS_PxIV P1IV,因为没有相同的寄存器,我改为了P1IFG,就出现了上述问题,
请问如何修改才更确切?