Here are some steps you can follow to enable the feature of upgrade(downgrade) the ncp image on host application.
1. upload the pre-build ncp image and uart-bootloader to the chip efr32mg12p332f1024gl125(brd4162a),Both of the firmwares base on the EmberZnet 6.2 in this article.
pre-build ncp image can be found in C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\v2.2\protocol\zigbee\ncp-images.
uart-bootloader has to be built by the customer,for more details you can refer to
3. enable client option of Over the Air Bootloading cluster on the EZSP-UART host application.
Edit 29 June 2020: Additionally, you also need to enable the following plugins from the plugins tab
1. OTA Bootload Cluster Client Policy -> this will also enable OTA Bootload Cluster Client , provide API:ota-client
2. OTA Cluster platform Bootloader
4. make and launch the host application. the ota-file folder will be created when the host application is launched for the first time.
5.creat the ota file with the ncp image base on EmberZnet 6.1 stack and put the ota file in ota-file folder.You have to convert the ncp image from .s37 file to .gbl file, and then convert the gbl file to the ota file.
Regarding how to convert the ncp image from .s37 file to .gbl file,you can refer to
6.re-launch the host application, the ota file should be found.
7.cli command <plugin ota-client bootload 0>is used to make the ncp run into the bootloader and transfer the image from the host application to the bootloader.
8 re-launch the host application, ncp stack version change to [6.1.0 GA build 84].
When customers develop their Zigbee application, most of them need to store nonvolatile data, so that these data can’t be lost after reset or power cycle. Because EM35x and Mighty Gecko process technology does not offer an internal EEPROM, a simulated EEPROM is implemented to use a section of internal flash memory for stack and application token storage. So customer can use custom application token to store these nonvolatile data. Here is example to help customers to use custom application token step by step.
Example:
Define your custom token in customer-token.h. There are three types of application tokens: BASIC/INDEX/COUNTER. Most of time, the BASIC token is enough for customers. Please refer to the attached customer-token.h.
Define the NVM3KEY which is needed when using NVM3.
Define the DEFINETYPES
Define the DEFINETOKENS
Copy the customer-token.h to the project folder.
Open the {PROJECT}.isc file, click the “Include” tab and find the Token Configuration, then browser the customer-token.h to set the custom app token header. Save the {Project}.isc.
Generate the project and click OK to overwrite the afv2-token.h file.
Build your project.
Read/Write the custom application token in {Project}_callback.c.
halCommonGetToken/ halCommonSetToken for BASIC token.
halCommonGetIndexedToken/ halCommonSetIndexedToken for INDEX token.
halCommonIncrementCounterToken for COUNTER token.
Please see attached callback.c for reference.
Reference:
For more information, please review the following documentation:
Zigbee & Thread Knowledge Base
How to upgrade(downgrade) the ncp image with host application
Here are some steps you can follow to enable the feature of upgrade(downgrade) the ncp image on host application.
1. upload the pre-build ncp image and uart-bootloader to the chip efr32mg12p332f1024gl125(brd4162a),Both of the firmwares base on the EmberZnet 6.2 in this article.
pre-build ncp image can be found in C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\v2.2\protocol\zigbee\ncp-images.
uart-bootloader has to be built by the customer,for more details you can refer to
UG266: Silicon Labs Gecko Bootloader User’s Guide
2. create an EZSP-UART host application base on EmberZnet 6.2 stack. You can refer to
How to build an EZSP-UART host application
3. enable client option of Over the Air Bootloading cluster on the EZSP-UART host application.
Edit 29 June 2020: Additionally, you also need to enable the following plugins from the plugins tab
1. OTA Bootload Cluster Client Policy -> this will also enable OTA Bootload Cluster Client , provide API:ota-client
2. OTA Cluster platform Bootloader
4. make and launch the host application. the ota-file folder will be created when the host application is launched for the first time.
5.creat the ota file with the ncp image base on EmberZnet 6.1 stack and put the ota file in ota-file folder.You have to convert the ncp image from .s37 file to .gbl file, and then convert the gbl file to the ota file.
Regarding how to convert the ncp image from .s37 file to .gbl file,you can refer to
UG162: Simplicity Commander Reference Guide
Regarding how to creat the ota file with gbl file, you can refer to
AN716: Instructions for Using ImageBuilder
6.re-launch the host application, the ota file should be found.
7.cli command <plugin ota-client bootload 0>is used to make the ncp run into the bootloader and transfer the image from the host application to the bootloader.
8 re-launch the host application, ncp stack version change to [6.1.0 GA build 84].
在应用层中如何使用Token存储非易失性数据?
在应用层中如何使用Token存储非易失性数据?
背景:
客户在开发应用程序时,经常需要存储一些非易失性数据,当设备复位或掉电之后数据依然保持不变。由于EM35x和EFR32MG芯片系列中没有内部EEPROM,EmberZnet使用部分内部Flash模拟EEPROM的功能来存储非易失性数据,比如网络参数信息、绑定表信息以及应用层存储非易失性数据等。在EmberZnet中,采用Token的方式对非易失性数据进行存储。
使用EmberZnet的Token来存储非易失性数据的方式可用于所需存储的非易失性数据不多(小于2KB或者小于8KB)的情形。而当需要存储大量的非易失性数据(数十KB甚至上百KB),就只能通过其它方式(增加外部EEPROM等)。
示例:
下面通过举例,介绍如何在应用层中使用应用层Token来存储非易失性数据。
参考资料:
更多信息请参考下面文档:
An703 Using the Simulated EEPROM for the EM35x and Mighty Gecko SoC Platforms
UG103-7 Tokens Fundamentals
How to use custom application token in EmberZnet?
How to use custom application token in EmberZnet?
Background:
When customers develop their Zigbee application, most of them need to store nonvolatile data, so that these data can’t be lost after reset or power cycle. Because EM35x and Mighty Gecko process technology does not offer an internal EEPROM, a simulated EEPROM is implemented to use a section of internal flash memory for stack and application token storage. So customer can use custom application token to store these nonvolatile data. Here is example to help customers to use custom application token step by step.
Example:
Reference:
For more information, please review the following documentation:
AN1154 Using Tokens for Non-Volatile Data Storage
AN1135 Using Third Generation NonVolatile Memory (NVM3) Data Storage
An703 Using the Simulated EEPROM for the EM35x and Mighty Gecko SoC Platforms
UG103-7 Tokens Fundamentals
EM3xx射频调试
由于PCB板材和元器件公差,射频电路阻抗将随着电路板的改变而改变。再者,阻抗匹配元器件本身的公差容许定值元器件之间的阻抗在一定的范围内,宽公差器件更不容易使调试结果趋于一致。鉴于此原因,为了得出最一致的用于生产的元器件值,至少应该采用3到5个相同设计的样品按如下步骤来作调试。需要注意的是,在进行对射频性能有更为精准要求的高端设计时,元器件型号和公差是一个重要的考量因素。
EM35xx射频调试包括两步:输出功率调试和接收灵敏度调试。建议发射频率误差先于射频调试之前进行。
发射频率误差/晶体调试:
为了无线网络中的设备正常工作,使发射频率误差尽可能小是非常重要的。更详细的内容参考以下KBA: http://community.silabs.com/t5/Wireless-Knowledge-Base/EM3xx-24MHz-Crystal-Tuning/ta-p/157154
发射功率调试(陶瓷巴伦):
在EM3xx的陶瓷巴伦设计中,主要任务是使EM3xx差分口和天线之间阻抗匹配最优来最小化射频通路的损耗。这可以通过调节放在差分口上连接EM3xx到陶瓷巴伦的电感值来实现。
为做到这点,首先通过NODETEST命令‘settxpower 8’将DUT配置为最大发射电平,通过NODETEST命令‘setchannel 13’将其配置到中间信道0x13(2445MHz,中间频点),再用NODETEST命令‘txtone’将DUT配置为连续未调制的发射状态。在谐波滤波器输出点用UFL,SMA或其它更好的射频接头连到频谱仪来测量输出功率。这样,一系列的电感值所对应的输出功率可以测量到,能提供最好阻抗匹配的电感值就得到最高的输出功率。调试目的就是确定此电感值。注意到这个电感值会因为PCB设计的不同而不同。
一旦调试电感值确定后,建议检查IEEE 802.15.4频段内高低信道的发射功率,确保发射功率在频段内变化不超过1dB。
发射功率调试(前端模块):
在EM3xx前端模块(FEM)设计中,发射功率调试是找到一个电感值能使EM3xx和FEM之间阻抗匹配最好。这个过程类似于陶瓷巴伦设计的调试,不过需要注意的是为了使FEM的PA工作在线性范围内,避免PA进入压缩状态,EM3xx的发射电平需要调的比正常状态低很多。例如,如果使有25dB增益的FEM额定输出+20dBm功率,EM3xx典型的发射功率值是-5dBm,那么就应当使用-9dBm或更低的电平来调试。参考以上陶瓷巴伦章节,使用的NODETEST命令来配置发射功率,信道和发射单音模式。需用TOKEN_MFG_PHY_CONFIG来正确配置发射信号进入单通道FEM的双向端口或双通道FEM的替代发射口。而且FEM的控制信号需要根据FEM的控制逻辑表来正确配置。最后需要注意的是VDD_PADS电源电压应设成FEM最大输出功率时的3.6V,或者是对设计调试时所希望的最大电压。
测量一系列的电感值对应的输出功率。类似于陶瓷巴伦调试,能提供最好阻抗匹配的电感值就得到最高的输出功率。调试目的就是确定此电感值。需要注意的是,这个电感值会因为PCB设计的不同而不同。建议检查高低信道的发射功率来确保发射功率在频段内变化不超过1dB。一旦调试电感值确定了,使FEM输出最高的功率(依照额定输出功率和区域法规的限制)的EM3xx最低发射功率就确定了。在客户应用中,可用这个EM3xx功率电平来正确配置PA处于低杂散发射和电流消耗时的最有效的电平。一旦EM3xx合适的发射功率电平设定确定后,建议测试DUT的EVM来确保没有PA压缩导致的失真。
灵敏度调试(陶瓷巴伦或1端口的FEM):
因为在这些设计中只有一个调试电感,接收灵敏度不可调。EM3xx里面的PA和LNA管脚具有类似的阻抗。因阻抗匹配中测试输出功率比测试灵敏度更来得实际,此电感值通过优化发射功率确定的。因此接收灵敏度就自然地优化了,无需进一步调试。
灵敏度调试(2端口的FEM):
在2端口的FEM设计中,接收端口可以独立于发射端口来调试。因为TX差分口和RX差分口的PCB LAYOUT不同,每个差分口阻抗因不同的LAYOUT而不同,因此需要不同的元器件调试值。接收口的调试就是确定调试电感值,能提供优化的阻抗匹配使接收灵敏度(最小信号电平使PER仍小于1%)最好。为了调试接收端,需要测量一系列的电感值所对应的灵敏度,来确定一个电感值使得在保持PER小于1%时信号源的电平最低。
DUT置于接收从信号发生器发的1000或10000有效包的模式(NODETEST命令'rx')。通常用于调试的是中间频点(2445MHz,ZigBee情形),建议在调试工作完成之前检查高低信道来确保接收灵敏度在频段内的差别小于1dB。
参考信息:
为了解更多的灵敏度测试细节,请参考AN700的2.10 Receive Sensitivity Test 章节: http://www.silabs.com/Support%20Documents/TechnicalDocs/AN700.pdf
为了解更多的EM3xx参考设计信息,请参考: http://www.silabs.com/products/wireless/zigbee/Pages/zigbee-reference-designs.aspx
为了解TOKEN_MFG_PHY_CONFIG的信息,请参考: http://www.silabs.com/Support%20Documents/TechnicalDocs/AN710.pdf
无线单波段子卡上的高电流消耗
问题:
在某些早期的带有 SPI Flash 的无线单波段子卡上, SPI Flash 没有正确的连接到系统上。 这会使得 flash 处于 active 状态从而导致子卡比正常期望值多3mA的电流消耗(如用 Energy Profier 监控 MCU 在低功耗模式下的电流消耗)。
起因:
受影响的子卡没有将 SPI Flash 的 FLASH_SCS 信号上拉到电源,这将导致此信号悬空电平处于浮空低位状态,从而使得 SPI Flash 处于活动状态而消耗电流。受影响的子卡版本如下:
- BRD4100A "EFR32BG 2.4 GHz 10.5 dBm Radio Board", Revisions prior to B03
- BRD4151A "EFR32MG 2.4 GHz 19.5 dBm Radio Board", Revisions prior to B04
- BRD4153A "EFR32MG 2.4 GHz 13 dBm Radio Board", Revisions prior to A04
应急方案:
手动把FLASH_SCS信号上拉到电源将会关闭 SPI Flash 器件,从而消除过多电流消耗现象。该方案可以通过手动把子卡的 FLASH_SCS 电位拉高, 或者让 EFR32xG 的 GPIO 输出高电平去控制 FLASH_SCS(比如对于 BRD4153A 子卡,MCU 的 PA4 脚连到了 SPI Flash 器件的 FLASH_SCS 信号上)。
解决方案:
这个问题已在各子卡的后续版本解决了。在前文列表中的文字 "Revisions prior to..." 是指各子卡在该版本第一次解决了该l问题。