cc3200 中断的问题
首先,我是刚学习CC3200芯片的,我从淘宝网上买了一块开发板学习。当我在测试CC3200SDK_1.2.0中的example\serial_wifi例子,用EWARM软件通过JTAG方式下载到芯片RAM中运行,main程序中建立了2个任务后执行osi_start(),我一直跟着代码走了下去,当调用portasm.s文件中的vPortStartFirstTask函数里的 “svc 0” (在152行)时,PC计数器不在执行下去了,一直停留在"SVC 0"这一行,这是什么原因呢?
我感觉好像不能进入中断异常,后来又测试了example\interrupt例子,也不能中断。
麻烦哪位工程师帮我解答下,谢谢。
烧了servicepack没有?
您好,我板子的外部SFLASH中有别人做的应用软件的,我并没有擦除掉外部SFLASH中的数据,我直接用IAR软件下载例程中的程序调试的,这样对中断有影响吗?当然后我没有改过例程中的程序。
一开始JTAG连不上芯片,后来看到网上的贴子说需要一个文件“CC31200_JLink.JLinkScript”,我使用了这个文件后才能调试的。
您指的Servicepack是什么?也需要写入外部SFLASH中的吗?
一个版本的SDK对应一个servicepack,请阅读 SDK里的doc,CC3200-Getting_Started_Guide.pdf.
servicepack相当于是补丁。
你好,我已经更新过servicepack,但是好像没用, 程序还是停留在 “SVC 0” 这一行。。。
[15:38:12] Begin ServicePackProgramming operation.
[15:38:13] INFO: > Executing Operation: Connect
[15:38:15] INFO: setting break signal
[15:38:15] INFO: connection succeeded
[15:38:15] INFO: getting storage list
[15:38:15] INFO: > Executing Operation: ServicePackProgramming
[15:38:15] INFO: Path to the service pack file: E:/TI/CC3100_CC3200_ServicePack_1.0.1.6-2.6.0.5/servicepack_1.0.1.6-2.6.0.5.bin
[15:38:15] INFO: reading version info
[15:38:15] INFO: CC3200R Device detected.
[15:38:15] INFO: NWP/MAC/PHY Version from Service Pack:
[15:38:15] INFO: NWP Patch version: 2.6.0.5
[15:38:15] INFO: MAC Patch version: 1.4.0.1
[15:38:15] INFO: PHY Patch version: 1.0.3.34
[15:38:15] INFO: reading version info
[15:38:15] INFO: DEVICE CC3200 ES1.33
[15:38:15] INFO: reading version info
[15:38:16] INFO: reading version info
[15:38:18] INFO: Downloading file "/sys/servicepack.ucf" with size 25820
[15:38:20] INFO:
New Token is 0x0
[15:38:20] INFO: Download complete
[15:38:20] INFO: > Executing Operation: Disconnect
[15:38:20] Operation ServicePackProgramming returned.
这是UniFlash显示的内容
文件系统:
[15:51:07] Begin ListFileSystem operation.
[15:51:07] INFO: > Executing Operation: Connect
[15:51:09] INFO: setting break signal
[15:51:09] INFO: connection succeeded
[15:51:09] INFO: getting storage list
[15:51:09] INFO: > Executing Operation: Init
[15:51:09] INFO: reading version info
[15:51:09] INFO: DEVICE CC3200 ES1.33
[15:51:09] INFO: reading version info
[15:51:10] INFO: reading version info
[15:51:12] INFO: > Executing Operation: ListFileSystem
[15:51:12] INFO: extracting file system information...
[15:51:12] INFO: Serial Flash block size: 4096 bytes
[15:51:12] INFO: Serial Flash capacity: 256 blocks
[15:51:12] INFO: file start size fail total size filename
[15:51:12] INFO: index block [BLKs] safe [BLKs]
[15:51:12] INFO: ----------------------------------------------------------------------------
[15:51:12] INFO: N/A 0 5 N/A 5 FATFS
[15:51:12] INFO: 0 81 22 yes 44 /sys/mcuimg.bin
[15:51:12] INFO: 4 5 5 yes 10 /tmp/phy.cal
[15:51:12] INFO: 6 15 33 yes 66 /sys/servicepack.ucf
[15:51:12] INFO: 7 125 1 no 1 www/main.html
[15:51:12] INFO: 8 126 2 no 2 www/index_cn.html
[15:51:12] INFO: 9 128 2 no 2 www/sys_status_cn.html
[15:51:12] INFO: 10 130 3 no 3 www/peripherals_uart0_cn.html
[15:51:12] INFO: 11 133 1 no 1 www/reload_reset_cn.html
[15:51:12] INFO: 12 134 3 no 3 www/wifi_set_cn.html
[15:51:12] INFO: 13 137 2 no 2 www/webee.png
[15:51:12] INFO: 14 139 17 yes 34 uart0.cfg
[15:51:12] INFO: 15 173 17 yes 34 netword.cfg
[15:51:12] INFO: 16 207 1 yes 2 /sys/mode.cfg
[15:51:12] INFO: 17 209 1 yes 2 /sys/ap.cfg
[15:51:12] INFO: 18 211 17 yes 34 socket_uart0.cfg
[15:51:12] INFO: 19 245 2 yes 4 /sys/pref.net
[15:51:12] INFO: 20 249 1 yes 2 /sys/ipcfg.ini
[15:51:12] INFO:
[15:51:12] INFO: Flash usage
[15:51:12] INFO: -------------------------
[15:51:12] INFO: used space: 251 blocks
[15:51:12] INFO: free space: 5 blocks
[15:51:12] INFO: memory hole: [251-255]
[15:51:12] INFO: > Executing Operation: Disconnect
[15:51:12] Operation ListFileSystem returned.
1. 先format flash,再烧servicepack, 试一试
2. 换个例子试试先,如getting_started_with_wlan_ap 或者get_weather
我已经格式化flash了,也已经烧写了servicepack,以下是获取的文件列表:
我用IAR打开了getting_started_with_wlan_ap,并重新选择了 J-link作为调试器。成功下载到了RAM,运行时还是停留在了 "SVC 0"
[15:59:07] INFO: > Executing Operation: ServicePackProgramming
[15:59:07] INFO: Path to the service pack file: E:/TI/CC3100_CC3200_ServicePack_1.0.1.6-2.6.0.5/servicepack_1.0.1.6-2.6.0.5.bin
[15:59:07] INFO: reading version info
[15:59:07] INFO: CC3200R Device detected.
[15:59:07] INFO: NWP/MAC/PHY Version from Service Pack:
[15:59:07] INFO: NWP Patch version: 2.6.0.5
[15:59:07] INFO: MAC Patch version: 1.4.0.1
[15:59:07] INFO: PHY Patch version: 1.0.3.34
[15:59:07] INFO: reading version info
[15:59:07] INFO: DEVICE CC3200 ES1.33
[15:59:07] INFO: reading version info
[15:59:08] INFO: reading version info
[15:59:10] INFO: Downloading file "/sys/servicepack.ucf" with size 25820
[15:59:13] INFO:
New Token is 0xD0FCCA53
[15:59:13] INFO: Download complete
[15:59:13] INFO: > Executing Operation: Disconnect
[15:59:13] Operation ServicePackProgramming returned.
[15:59:15] Begin ListFileSystem operation.
[15:59:15] INFO: > Executing Operation: Connect
[15:59:17] INFO: setting break signal
[15:59:18] INFO: detecting FTDI for device reset
[15:59:18] ERROR: No device USB ports were found
[15:59:18] INFO: --- please restart the device ---
[15:59:21] INFO: connection succeeded
[15:59:21] INFO: getting storage list
[15:59:21] INFO: > Executing Operation: Init
[15:59:21] INFO: reading version info
[15:59:21] INFO: DEVICE CC3200 ES1.33
[15:59:21] INFO: reading version info
[15:59:22] INFO: reading version info
[15:59:24] INFO: > Executing Operation: ListFileSystem
[15:59:24] INFO: extracting file system information...
[15:59:24] INFO: Serial Flash block size: 4096 bytes
[15:59:24] INFO: Serial Flash capacity: 256 blocks
[15:59:24] INFO: file start size fail total size filename
[15:59:24] INFO: index block [BLKs] safe [BLKs]
[15:59:24] INFO: ----------------------------------------------------------------------------
[15:59:24] INFO: N/A 0 5 N/A 5 FATFS
[15:59:24] INFO: 4 5 5 yes 10 /tmp/phy.cal
[15:59:24] INFO: 6 15 33 yes 66 /sys/servicepack.ucf
[15:59:24] INFO:
[15:59:24] INFO: Flash usage
[15:59:24] INFO: -------------------------
[15:59:24] INFO: used space: 81 blocks
[15:59:24] INFO: free space: 175 blocks
[15:59:24] INFO: memory hole: [81-255]
[15:59:24] INFO: > Executing Operation: Disconnect
[15:59:24] Operation ListFileSystem returned.
问题解决了,每次下载调试时必须断下电,然后就正常了