EFR32 NodeTest

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_21352095/article/details/85013682

1、NodeTest是一个由Silicon Labs提供的预先构建的应用程序,用于在开发板或定制设计的硬件上执行射频评估、功能测试和硬件验证。NodeTest应用程序提供了对无线电的低级控制,可以用于执行以下任务:

  1. 测试无线电性能。
  2. 设置制造和堆栈参数(令牌)。
  3. 在生产后验证适当的功能。
  4. 为许多国家要求的认证过程适当地控制无线电。

2、NodeTest应用程序支持命令解析器,并以一致的、易于解析的格式提供结果。虽然NodeTest没有源代码可用,但大多数NodeTest的RF测试功能也可以通过EmberZNet PRO中公开的制造库API (mfglib)和Silicon Labs线程通过mfglib库(用于SOC平台)或mfglib串行命令(用于NCP平台)获得。因此,自定义构建的应用程序可以在为其板配置专门设计的应用程序中本地合并此功能,而无需依赖预构建的NodeTest固件。NodeTest应用程序包含在EmberZNet PRO和Silicon Labs线程堆栈安装目录中,它们都包含一组/build/ NodeTest -xxx子目录,用于给定的处理器/体系结构变体xxx。这些目录包含。s37和.ebl文件映像,这些映像可以通过基于串行线或jtag的固件加载过程安装到芯片上。

3、NodeTest固件在:SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\v2.4\protocol\zigbee\build,不过只包含一部分IC型号的固件,可以使用Commander直接烧录 nodetest.s37文件到芯片上,烧录后可以使用Simplicity Studio打开对应的J-link Console,选择Serial1,在输入区域按回车,然后NodeTest会初始化:
在这里插入图片描述
然后输入help,按回车键发送:
在这里插入图片描述

4、NodeTest包含以下10项测试:

  1. Token测试
---- token-test ----
  initTokens  - Invoke top level token initialization
  tokRead u2 - Read all data of a token (u2=creator code)
  tokReadIdx u2u1 - Read an index of a token (u2=creator code, u1=idx)
  tokWrite u2 - Write all data of a token (u2=creator code)
  tokWriteIdx u2u1 - Write an index of a token (u2=creator code, u1=idx)
  tokReadResp u2 - Similar to tokRead but follows platformtest format (u2=creator code)
  tokWriteResp u2b - Similar to tokWrite but follows platformtest format (u2=creator code, b={hex_data_buffer})
  tokDump  - Dump the entire token data set
---- token-cortexm3-test ----
  tokMap  - Print the Token Memory Map
  loadToks  - Load stack and application token defaults
  1. Button测试
---- button-test ----
  button u1 - Test Buttons. Use u1!=0 for polling
  crashinfo  - Print crash information
  1. 外挂Flash测试
---- extflash-test ----
  appblver  - Report the version of the installed app bootloader
  efInit  - Initialize the external flash driver
  efshutdown  - Shutdown the external flash driver
  efChipErase  - Erase the external flash chip
  efPageErase u4u4 - (address len) Erase pages on the external flash chip
  efRead u4u2 - (address len) Read data from the external flash chip
  efWrite u4u2 - (address len) Write random data to the external flash chip
  efWriteTest u4u4u4 - (address len seed) Write random data, lengths to the external flash chip
  efReadTest u4u4u4 - (address len seed) Verify random data, lengths read from the external flash chip
  efStream  - Init and erase ext flash and then accept hex data to be written sequentially
  efBootload  - Verify image in external flash and then invoke bootloader to install it
  1. GPIO测试
---- gpio-test ----
  gpioRead  - Print GPIO state
  gpioSet u4u4* - (port pinmask) or (portpin) Set the masked pins on the given GPIO port high.
  gpioOut u4u4 - (port pins) or (portpin value) Set the given GPIO port to the given pin state.
  gpioClear u4u4* - (port pinmask) or (portpin) Clear the masked pins on the given GPIO port.
  gpioCfg u4u4u4* - (port MODEL MODEH) Set configuration mode for the given GPIO port.
  gpioMode u4u4 - (portpin mode) Set configuration mode for the given GPIO port/pin.
  gpioSlewrate u1u1u1 - (port slewrate slewrateAlt) Set slewrate and alternate slewrate for the given GPIO port.
  1. LED测试
---- led-test ----
  ledOn u1 - Turns on LED u1
  ledOff u1 - Turns off LED u1
  ledToggle u1 - Toggles LED u1
  1. 睡眠测试
---- sleep-test ----
  shutdown  - Put the chip in the Deep Sleep state
  1. 系统测试
---- sys-test ----
  getrev  - Retrieve System Revision
  1. 复位测试
---- reset-test ----
  resetstring  - Print the ResetString
  assertme  - Resets the chip using assert()
  1. RF测试
---- phy-common ----
  initRadio  - call emRadioInit().
  seedPnrg  - Seed the PNRG with random data from the radio
  setPerTest u1 - (m) Set Packet Error Rate test mode to m (0-disable, 1-enable)
  getChannel  - Get the current channel
  setChannel u1 - (c) Set the radio channel to c
  getChanFreq u1 - (c) Display the center frequency for channel c
  gRadPowState  - Get the radio current power state
  sRadPowState u1 - (s) Set the radio current power state to s (0-asleep, 1-awake)
  getCca  - Get Clear Channel Assessment.  1 = Clear; 0 = Busy.
  getRssi  - Get RSSI in dBm over 8 symbol periods.
  getEd  - Get 802.15.4 ED (-100dBm to -36dBm : 0x00 to 0xff) over 8 symbol periods.
  edScan u4u4* - Perform ED scan for n samples on current channel or optional channel mask m.
  getCcaThresh  - Get CCA-ED threshold in dBm.
  setCcaThresh s1 - (e) Set CCA-ED threshold to e dBm.
---- phy-common-pta ----
  getPta  - Get state of packet traffic arbitration(0-enabled,1-disabled)
  setPta u1 - Enable(1)/disable(0) packet traffic arbitration
  getPtaOption  - Get pta options bit mask
  setPtaOption u4 - Set pta options bit mask
  setPtaReqArb u1 - Enable(1)/disable(0) packet traffic arbitration read PTA_REQ_GPIO before asserting
---- phy-common-rx ----
  showPayload u1 - Enable(1)/disable(0,default) PHY payload display in RX output
  rx  - Receive mode
  rxQuiet  - Receive mode but don't print received packets
  rxBg u1* - Enable(1)/disable(0)/toggle Receive Background mode
---- phy-common-tx ----
  setPerTestTx  - Setup TX for IEEE 802.15.4 PER test
  getTxPower  - Get current radio TX power in dBm
  setTxPower s1 - (p) Set radio TX power to p dBm
  getTxPowerFl  - Get current radio TX power in dBm * 100
  setTxPowerFl s2 - (p) Set floating point radio TX power to p dBm * 100 (for 10.25 dbm, input 1025
  getTxDelay  - Get TX interpkt delay in us
  setTxDelay u2 - (d) Set radio tx interpkt delay to d us
  tx u2 - (n) TX n pkts (0=infinite)
  txStream  - TX continuous stream of random symbols
  txTone  - TX single carrier frequency
  getTxPacket  - Display TX pkt length & payload
  setTxLength u1 - Set TX payload length
  setTxPayload u1u1u1u1u1 - (o d0 d1 d2 d3) Set TX pkt payload data d0-3 at offset o
  setCheckCca u1 - Enable(1)/disable(0) HW backoff & CCA
---- phy-em250class ----
  calChannel u1 - Set the channel; perform full calibration
  setSynOffset s1 - (o) Offset the synth frequency by o 9.375kHz increments.
---- phy-efr32 ----
  setCtune u4 - set CTUNE register (CMU->HFXOSTEADYSTATECTRL_CTUNE)
  getCtune  - get CTUNE register value
  1. 平台测试
---- platformtest ----
  version  - Prints version information.
  verbose u1u1u1u1u1 - Sets verbosity of header command tag delim text
  help  - Prints this help menu
  list b - list commands of specified module name
  !  - Recalls the previous command
  [tab] - Attempts to tab complete command

5、更多内容请查看官方文档《an1019-node-test

6、如果没有找到对应芯片的固件则可以使用Manufacturing Library插件,勾选后需要重新生成代码,点击右上角的“Generate”按钮,如图:
Lib

猜你喜欢

转载自blog.csdn.net/qq_21352095/article/details/85013682
今日推荐