打印
[射频芯片]

SI4432进入不了中断

[复制链接]
2261|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
nt06|  楼主 | 2013-11-23 12:28 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

        //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 | 只看该作者
没做过哎,给你一个参考的程序吧。应该是程序的问题,一行行地区调试吧。 SI4432 发送 接收程序.zip (4.81 MB)

使用特权

评论回复
评分
参与人数 1威望 +1 收起 理由
nt06 + 1 很给力!
地板
lyf20140402| | 2014-4-24 18:07 | 只看该作者
貌似我都看不懂

使用特权

评论回复
5
xialei8513| | 2015-11-4 11:53 | 只看该作者
无法进入中断,最后解决了吗?问题出在哪里?楼主

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

4

主题

16

帖子

0

粉丝