|
此处用的模块为EMW3162,底板为EMB-380-S2 V1.2,使用MDK调试MXCHIP所提供的例程。
在调试demo1:WiFi_Link时出现以下现象:
1. 程序烧写后无法正常输出打印,调试时发现程序卡在此处 0x08010C38 死循环,汇编窗口信息如下:
...
...
0x08010C1E F7FFFF87 BL.W systick_init (0x08010B30)
0x08010C22 F013FAE4 BL.W wlan_init (0x080241EE)
0x08010C26 F000FA39 BL.W EmStack_Init (0x0801109C)
0x08010C2A 2001 MOVS r0,#0x01
0x08010C2C F7FFFEB7 BL.W led (0x0801099E)
0x08010C30 F7FFFFD6 BL.W app_verify (0x08010BE0)
0x08010C34 B108 CBZ r0,0x08010C3A
0x08010C36 BF00 NOP
0x08010C38 E7FE B 0x08010C38 <<<<<<<<<< 调试时,程序卡在此处。
...
...
2. 针对上述现象,如果强制性修改PC指针为 0x08010C3A,程序继续运行,串口此时有打印,输出打印信息:
OTP Fail
3. 继续修改PC指针,运行,串口终端打印信息如下:
OTP Fail
mxchipWNet Demo: Wi-Fi Link
mxchipWNet library version: 31620001.027
Start scan
connect to UP_Team....., return -1
Setup soft AP: Soft AP test, return 0
uAP up
Soft AP mode: IP address: 192.168.0.1
Soft AP mode: NetMask address: 255.255.255.0
Soft AP mode: MAC address: c8934640891d
4. 若工程中将main()函数中的第一行代码:mxchipInit();注释掉,则程序运行,串口终端输出以下调试信息:
mxchipWNet Demo: Wi-Fi Link
mxchipWNet library version: 31620001.027
Start scan
综述,调试中发现是 mxchipInit(); 引发的程序出错,但不知道具体的原因何在,望论坛中给力坛友能够给予解答~
|
|