nt06 发表于 2013-11-23 12:28

SI4432进入不了中断


void main(void)
{
      U8 ItStatus1,ItStatus2;
      U16 delay;
      U8 length,temp8;
      U8 payload;

      //Initialize the MCU:
      //      - set IO ports for the Software Development board
      //      - set MCU clock source
      //      - initialize the SPI port
      //      - turn ofF LEDs
      MCU_Init();
                                                      /* ======================================================== *
                                                         *                                                Initialize the Si443x ISM chip                              *
                                                         * ======================================================== */

      //Turn on the radio by pulling down the PWRDN pin
      SDN = 0;
      //Wait at least 15ms befory any initialization SPI commands are sent to the radio
      // (wait for the power on reset sequence)
      for (temp8=0;temp8<15;temp8++)
      {
                for(delay=0;delay<10000;delay++);
      }         
                        
      //read interrupt status registers to clear the interrupt flags and release NIRQ pin
      ItStatus1 = SpiReadRegister(0x03);                                                                                                                //read the Interrupt Status1 register
      ItStatus2 = SpiReadRegister(0x04);                                                                                                                //read the Interrupt Status2 register
                                                
      //SW reset   
          SpiWriteRegister(0x07, 0x80);                                                                                                                              //write 0x80 to the Operating & Function Control1 register

      //wait for POR interrupt from the radio (while the nIRQ pin is high)
      while ( NIRQ == 1);
}
攫取的一端程序 NIRQ总为1,根本就进入不了中断
这程序为什么进入不了中断了? 我用的是的C8051F931的硬件接口三线模式其中SCK 为 P1.0 SDI P1.1 SDO P2.2   NSELP1.4
想不通啊 哪位大哥做过的?赐教一下感激不尽!

黄小俊 发表于 2013-11-23 22:52

路过,帮顶。。

linfeng24 发表于 2013-11-27 00:47

没做过哎,给你一个参考的程序吧。应该是程序的问题,一行行地区调试吧。

lyf20140402 发表于 2014-4-24 18:07

貌似我都看不懂

xialei8513 发表于 2015-11-4 11:53

无法进入中断,最后解决了吗?问题出在哪里?楼主
页: [1]
查看完整版本: SI4432进入不了中断