年前,做了2个月的JENNIC开发套件模仿,顺利地做成了,并且也完成了下载线的制作,及程序的初步理解,但当时好像是ADC转换的数据有极大的误差,没有找到原因。
并且在当时,遇到MAC地址全变成0XFFFF,FFFF,FFFF,FFFF.导致写不进程序,最终通过博讯科技解决了问题,
可当如今时隔8月,却什么都忘记了。所以俺这次想做个详细的笔记,以便下次能节省俺的时间。呵呵~~~~~~~~
首先,ZIGBEE 的MAC地址由64位组成 ,其中高24位为OUI,即组织单一标识码,主要用来指定一些厂商。后40位为指定商品件。另外In addition, every end-product that is based on the Jennic ZigBee stack requires a suitable
license key that allows the stack to be activated in the product.
2.3 How do Addresses become Corrupted?
During development, the continuous cycle of Flash re-programming can lead to the address
becoming corrupted under the following conditions:
? Low battery level
If the battery level drops below 2.5V, the board operates correctly but the Flash will not
program reliably, since its minimum programming voltage is 2.5V.
? Flash programming disrupted
Avoid powering off or cancelling the Flash programming mid-session.
? If the application code unintentionally calls bAHI_FullFlashProgram (JN5139)
2.4 Re-installing the Original MAC Address
A printed list of the module MAC addresses is included in the evaluation kit. If you have the
original MAC address then this can be used to reprogram the device as follows:
Step 1 Create a text file in the following format, inserting your MAC address into the 16-digit
number. For example:
# Jennic MAC replacements
0, 0x00158d000005844b, 0xffffffffffffffffffffffffffffffff
0, 0x00158d000005844c, 0xffffffffffffffffffffffffffffffff
For ZigBee there is an additional licence key number and the format is as follows:
# Jennic MAC and ZigBee key replacements
0, 0x00158d000005844b, 0x23f3300f36769efb0b4b89ce4a0f294b
0, 0x00158d000005844c, 0x0d0e2df7f083cd14df9e7e872ad7cff3
Note: The installer will change the ‘0’ digit in the first column to ‘1’, once the address
has been used.
Step 2 Rename the file mac.lic. This is now ready to be loaded into the Jennic license
installer.
Step 3 Follow the instructions in Section 3 to re-install the MAC into the device.
3 Using the License Installer
This section describes how to use the Jennic License Installer utility.
3.1 Installing the Programmer
? The license installer is packaged with this Application Note.
? Unzip the file MacZigBeeLicInstxxx.zip to a convenient directory.
3.2 Programming the MAC Address/ZigBee License
The procedure for MAC address and ZigBee license programming is as follows:
注意:这里用的是安装器,而不是编程器,
Step 1 Ensure that your PC is connected to the target board via a serial cable.
Step 2 Power up the target board, and put it into Flash programming mode.
Step 3 Run the JenZBLicInst.exe application from the installed directory.
Step 4 Select the appropriate serial COM port.
Step 5 Click the Install button, and follow the on-screen instructions.
Step 6 Close the installer and open the JN51xx Flash programmer to install the application
software. Any existing application software is erased during the installation.
关于MAC 地址恢复问题参考:JN-AN-1066-MAC-Addr-ZigBee-License-1v0
务必要注意,一定要把该文件夹,加到C盘,JENNIC默认的目录下,否则MAC地址安装器是不能运行的。
以上是关于MAC地址恢复的总结。
在焊的两个试验板中,有一个不能通过串口下程序,找到最后发现SP3232的第9脚虚焊。也即RTS与PGM的连接通路被断开,从而再下载程序时,虽然第9脚输出为低,但PGM仍为高,最后重新把SP3232焊了焊,结果一切OK.

JENNIC 环境配置问题,涉及下面3个文档
JN-UG-3028-CodeBlocks-1v5
JN-UG-3007-Flash-Programmer-1v9
JN-UG-3035-SDK-Installation-1v2
5.1.1 Configuring the Integrated Debugger
The procedure below describes how to configure the integrated debugger.
Step 1 Start Code::Blocks (if not already started).
Step 2 Follow the menu path Settings>Compiler and debugger.
This displays the Compiler and debugger settings screen.
Step 3 Select the Debugger settings icon from the left panel and fill in the dialogue box as
follows:
a) Update the following lines in the Debugger initialisation commands field:
set remotebaud 9600
target remote /dev/ttyS2
Note that this assumes you will use a baud rate of 9600 bps. However, you can
use a different baud rate, if you wish – see Section 5.1.3.
It also assumes you will use serial port COM3 for debugging. If you wish to use
a different serial port, change x in /dev/ttySx accordingly (note that COM1
corresponds to ttyS0, COM2 to ttyS1 and so on).
b) Ensure that the checkbox Do not run the debugee (program to be debugged)
is selected.
c) In the area Choose disassembly flavor (GDB only), from the drop-down list
select “Custom (specify instruction set)” and in the right field enter “or32”.
This screen should then look as shown in the screenshot below.