/************************************************************** * Main Loop, repeated now forever **************************************************************/ for(;;) { u8DeviceLed = 0x05; /* LEDs all off */ u8LightLed = 0x05; LedDrive(u8DeviceLed); u8AppStatus = 0; /* Enable keyboard irq. Depressing PB0 will cause a wake up */ KBI1SC_KBIMOD = 0; PB0IE =1; KBI1SC_KBI1E = 1; /* MC13192 Reset mode and MCU STOP3. */ /* This is the stand-by low power mode. */ UseMcuClock(); /* MCU internal clock selected since we'll lose our external clock */ MC13192ContReset(); /* Place the MC13192 into Reset mode */ //KBDWAIT(); /* Wait for PB1 to be depressed. Note: requires Rev C GB60 board */ /* PB0 depressed */ u8Dsn++; /* increment the data sequence number */ if (u8Dsn == 0xFF) /* 0xFF is reserved and used at startup only for devices */ { u8Dsn = 0x00; } /* Restart to external clock appx. 10.8mS */ MC13192Restart(); /* Bring the MC13192 into the desired Idle condition. */ RadioInit(); MLMESetChannelRequest(0); /* Set the selected u8Channel. */ MLMESetMC13192ClockRate(1); /* Back to 8MHz CLKo */ UseExternalClock(); /* Use external accurate clock */
谢谢seuafu2005
但是还有一点疑问:
本程序开始放开了KBI中断
在让MC13192 Reset mode and MCU STOP3
接着Bring the MC13192 into the desired Idle condition并且MCU被唤醒
我用的是13192SARD的模块
问题是:1.前面程序并没指明是哪个按键唤醒啊
2.唤醒后,程序从哪儿开始执行 是从u8Dsn++; /* increment the data sequence number */这儿吗??
3.斑竹能不能具体说说KBDWAIT(); 的功能,用不用它有何影响? 作者: seuafu2005 时间: 2006-12-7 13:36