我zigbee模块是cc2530,P2.3和P2.4没有接32K晶振,导致了协议栈一直卡死在ZMacInit函数中,该如何解决这个问题呢?感谢
Viki Shi:
hal_board_cfg.h文件,默认外部32块晶振 // Values based on powerup h/w config as input with pull-up – not using dynamic cfg of transport. #define ZNP_CFG0_32K_XTAL 1 /* 32kHz crystal installed and used */ #define ZNP_CFG0_32K_OSC 0 /* 32kHz crystal not installed; internal osc. used */ #define ZNP_CFG1_SPI 1 /* use SPI transport */ #define ZNP_CFG1_UART 0 /* use UART transport */ #define ZNP_CFG1_UART_USB 2 /* definition required for CC2531 compatibility */ extern unsigned char znpCfg1; extern unsigned char znpCfg0;
#define OSC_32KHZ 0x00 /* external 32 KHz xosc */#else#define OSC_32KHZ 0x80 /* internal 32 KHz rcosc */#endif#endif