background image

ZWP500

 

Z-Wave Production Programmer & Tester  

www.ExpressControls.com 

 

 

February 2018

 

Bringing 

the Internet of Things (IoT) to Life

 

15 

 
After a command is sent, the program 

must wait

 for the acknowledge and any expected return data. The PSoC may drop 

commands if multiple commands are sent without waiting for the acknowledge. 
  

AcquireDUT 

The AcquireDUT command attempts to put the DUT into Z-Wave programming mode. If successful, the last four bytes of 
signature of the chip is returned. The DUT must already be powered (VIOSet). The VIO will be measured and will return 
an error if the voltage is below 2.0V. 
 
Example: AcquireDUT 
Returns: 
*<cr>Signature= 7F1F0401<cr>  

if successful and the target device is a 500 series 

!<cr>FAIL - VIO below 2.0V<cr>  

or other message indicating the failure. A signature of all FFs is a failure. 

Calibrate 

An RF calibration cycle is run on the DUT. This operation takes about 2 seconds to complete as the calibration program 
has to be downloaded and then executed. The calibration values are NOT written to the NVR. The assumption is that a 
programming cycle will immediately follow the calibration cycle and the new calibration values will be written to the NVR at 
that time. The NVR is ERASED during the calibration process. It is REQUIRED to read the NVR prior to running a 
calibration and to restore the NVR afterward. Do NOT run a calibration alone. The ZWP500 has a high precision crystal 
and is able to accurately measure and set the CCAL value.  
 
Example: Calibrate 
Returns: 
…..*<cr>CCAL=xx TXCAL1=yy TXCAL2=zz<cr> 
Where xx, yy and zz are the hexadecimal values for the respective calibration values. The periods (.) indicate the 
calibration program is being downloaded. The acknowledge (*) takes about 2 seconds before it is returned. An ! is 
returned if there is a failure. 

FirmwareUpdate 

Download and update the PSoC firmware with the Intel hex file that is sent immediately after the command. Care must be 
taken with this command as it is possible to “brick” the PSoC if there is a power failure during the process or if the data is 
corrupted. When the PSoC is ready for each line of the hex file it will 

send an ACK (the character ‘$’). If the line of code 

fails the checksum, then a NAK (‘~’) is sent and the line must be resent. The program sending the firmware MUST wait for 
the ACK before sending the next line as the PSoC only has temporary storage for 1 line at a time. Every few lines there 
will be a pause while the PSoC writes the data into FLASH. Note that the data is written directly into FLASH so if a failure 
occurs it is likely unrecoverable and the unit will have to be reprogrammed at the factory. 
 
Example: 
FirmwareUpdate<cr> 
<wait for the $ to arrive> 
:400000000080002011000000A5490000A549000080B500AF024A034B1B68136004F0F6FCBC760040FA46004010B50
54C237833B9044B13B10448AFF300800123237010BD45 
<wait for the $ to arrive then send each line of the intel hex file> 
Repeat the two lines above for each line of the hex file. If a NAK is received, resend the line. 
… 
:00000001FF 
The last line of the hex file is shown above and indicates that the download is complete. 
*<cr> 
Is the final indicator that the firmware download is complete and the PSoC will complete writing the data to FLASH and 
then reboot. The normal boot messages will then be sent if the firmware is good. 

Summary of Contents for ZWP500

Page 1: ...other custom fields Set the LOCK bits to prevent unauthorized access to the firmware Have your team develop the test code or let the experts at Express Controls do it for you Features Sigma Designs 500 Series FLASH Programmer Standard Sigma 12 pin programming header o SPI interface for programming o UART interface for debug NVR and external NVM programming test 1ppm Crystal RF Calibration SmartSta...

Page 2: ... 10 Serial Port 10 USB Ports 10 HDMI Port 10 Ethernet Port 10 WiFi Access 10 Desktop Sharing with VNC 10 Source Code Control of Scripts 10 Sigma 500 Series RF Calibration 11 Tx Calibration 11 Crystal Calibration 11 Programming 11 Non Volatile Register NVR Fields 11 Override Value 12 Incrementing Value 12 Check Value 12 Random Value 12 Scanner Value 12 Sigma Security S2 DSK 12 Lock Bits 13 Example ...

Page 3: ... Calibrate 15 FirmwareUpdate 15 FlashDownload 16 FlashErase 16 FlashWrite 16 FlashRead 0xxxxx 0yyyyy 17 FlashVerify 17 FlashCRC 17 GPIOGet 17 GPIOSet PS 17 Help 18 I2CGet AA LL 18 I2CProbe 18 I2CSend AA DD p 18 LEDSet RGB 19 NVMGet SSSSSS EEEEEE 19 NVMSet AAAAAA DD 19 NVRGet 20 NVRSet AA DD 20 ResetDUT 0 21 RFAttenuatorSet DD 21 UARTGet 21 UARTInit BB 21 UARTSend DD 22 VIOSet 22 VIOGet 22 ZWaveGet...

Page 4: ...ZWP500 Z Wave Production Programmer Tester www ExpressControls com February 2018 Bringing the Internet of Things IoT to Life 4 References 24 Warrantee Copyright 24 Document History 25 ...

Page 5: ...r you or your team can develop it using the sample code provided with the ZWP500 as a guide The ZWP500 is can be used for software validation to verify there are no bugs in each release of firmware The full power of high level programming languages like Python or C can be used to test every button press and Z Wave command class with each firmware revision Push buttons can be activated with millise...

Page 6: ...hical user interface Thus a keyboard mouse and monitor are needed The RPi3 has an HDMI connector which is typically connected to an inexpensive HDMI capable monitor with at least 1280x800 resolution 1910x1080p resolution is recommended Any generic keyboard and mouse will typically work They can be either wired for maximum reliability or wireless for maximum flexibility A custom designed test jig i...

Page 7: ...h to ensure reliable signal quality Z Wave Programming Cable Z Wave Programming Cable TOP view VIO 1 2 I2C_SCL NVM_CS_N 3 4 MOSI I2C_SDA 5 6 MISO GND 7 8 SCK GND 9 10 RESET_N RXD 11 12 TXD Pin Signal Name Description 1 VIO Power for the DUT programmable voltage from 2 0 to 4 5V at up to 300mA 2 I2C_SCL Optional I2C SCL signal for controlling GPIO expanders ADC DACs on DUT test board 3 NVM_CS_N Opt...

Page 8: ...so be used as an example of how to program and test a Z Wave 500 series product using the ZWP500 The SensorPIR project from the Sigma SDK is pre loaded on the ZWP500 and an icon to program and test it is on the Desktop Double click on the SensorPIR icon and a terminal window comes up Press enter to get a list of commands available by the programming and test program The program is written in Pytho...

Page 9: ...read See the PCAL9535A data sheet for more details Command Byte definition 0x00 read port 0 0x01 read port 1 0x02 set the output value for port 0 0x03 set the output value for port 1 0x06 set the configuration for port 0 a 1 sets the pin to an input 0 is an output 0x07 set the configuration for port 1 a 1 sets the pin to an input 0 is an output Raspberry Pi The brains of the ZWP500 are provided us...

Page 10: ...and memory sticks The bar code scanner and the label printer can be connected directly to these USB ports HDMI Port An HDMI port on the ZWP500 should be connected to a monitor to enable the user to interface with the software on the ZWP500 The recommended resolution is 1280x1024 which is the default setting The RPi supports many other resolutions and most monitors will work See the Raspberrypi org...

Page 11: ...ate 1MHz 256 clock onto the MISO pin The calibration process takes 1 2 seconds plus the time to program the DUT with the calibration program Total time is about 3 seconds Note that if performing crystal calibration it is strongly recommended that the ZWP500 operate in a temperature and humidity controlled environment with an ambient temperature of approximately 72F Tx Calibration There are two TX ...

Page 12: ...the next value If the NVR already has a value for this field other than 0xFF the value is not altered The ini file is updated with the final valued used when the program is exited This is most commonly used for UUID to program a serial number for the unit The value to be incremented is a 32 bit integer Check Value If a question mark is appended to the value then the NVR value is checked that it is...

Page 13: ...age for the Z Wave network routing tables The ZWP500 is able to inspect erase and set values in the NVM using the NVMSet Get commands VIO Voltage Current The DUT is typically powered from the VIO pin of the ZWP500 cable The voltage of VIO is programmable from 2 0V to 4 5V using the VIOSet command The VIOGet command returns the instantaneous voltage at the VIO pin of the cable The current is also m...

Page 14: ...orPIR example also logs a number of metrics into a comma separated value csv file Each DUT tested is recorded in the file for later analysis and identification of areas of yield improvement ZWP500 Interface The RPi communicates to the ZWP500 PSoC5 board via a UART which runs at 921600 baud The following sections detail the commands that can be sent to the PSoC5 and their responses It is recommende...

Page 15: ...e xx yy and zz are the hexadecimal values for the respective calibration values The periods indicate the calibration program is being downloaded The acknowledge takes about 2 seconds before it is returned An is returned if there is a failure FirmwareUpdate Download and update the PSoC firmware with the Intel hex file that is sent immediately after the command Care must be taken with this command a...

Page 16: ...ne of HEX file 10 Wait up to 10s final check sum calculation 11 cr ACK download is complete and CRC is good cr indicates a failure 12 Typically send a FlashCRC at this point to read the calculated CRC value of the HEX file FlashErase Erase the DUT FLASH The NVR settings are retained but the rest of the DUT FLASH is reset to all ones This command is not normally needed as the FLASH is automatically...

Page 17: ...RC Returns the four byte CRC in the downloaded hex file the computed CRC and the DUT CRC if the DUT is acquired Typically this command is used to ensure the proper hex file is downloaded into the ZWP500 Example FlashCRC cr Returns cr FlashCRC xxxxxxxx CalcCRC yyyyyyyy DUTCRC zzzzzzzz cr Where xxxxxxxx is the CRC in the downloaded hex file if one has been downloaded yyyyyyyy is the calculated CRC b...

Page 18: ...e address byte then a is returned An I2C STOP condition is always performed at the end of the command Example I2CGet 21 03 Returns cr I2CGet 01 02 03 This example sends an I2C read command to slave address 0x21 the first byte of the command is 0x43 If the slave ACKs the write then the three data bytes are read from the device and returned All values are hexadecimal I2CProbe Configures pins 2 and 5...

Page 19: ...DSet 100 Turns on only the RED LED Returns cr NVMGet SSSSSS EEEEEE Most Z Wave devices utilize an external Non Volatile Memory to store the Z Wave routing tables application specific variables and an Over The Air firmware image The NVM is most often an Adesto AT25PExx which is fully supported by the ZWP500 The NVM chip select signal must be connected to the Z Wave programming cable pin 3 to enable...

Page 20: ...AcquireDUT before sending the NVRGet Example NVRGet cr Returns cr 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 10 01 09 01 FF 0D E8 8C 1B 00 FF FF FF FF FF FF FF 20 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 30 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 40 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 50 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 60 FF FF FF FF FF FF FF FF F...

Page 21: ...contains a pair of Digital Step Attenuators DSA on the RF path from the Z Wave chip to the antenna SMA connector The RF signal can be to be attenuated by up to 60db Attenuating the RF signal enables the RF signal quality to be measured without needing to physically move the DUT a long distance from the ZWP500 Example RFAttenuatorSet 3F Set the RF attenuation to be approximately 30db Returns cr if ...

Page 22: ...tion is to immediately follow a ZWaveSend with at least one ZWaveGet and typically several An unsolicited frame may also arrive which may also have multiple retries in it which is why the receive buffer is purged when a ZWaveSend command is sent During production testing the optional parameter TT is typically set to 01 or even 00 to shorten the timeout because there should be no routing or other d...

Page 23: ...nds are listed in the table below Complete details are found in the Sigma documentation for the SerialAPI and the command class documents Name Hex Description FUNC_ID_SENDDATA 0x13 Send a command over the Z Wave radio FUNC_ID_SETDEFAULT 0x42 Reset to factory new FUNC_ID_ADD_NODE_TO_NETWORK 0x4A Enter Inclusion mode FUNC_ID_REMOVE_NODE_FROM_NETWORK 0x4B Enter Exclusion mode FUNC_ID_SET_LEARN_MODE 0...

Page 24: ... repair opened or otherwise modified c units not used in accordance with instructions d damages exceeding the cost of the product e the finish on any portion of the product such as surface and or weathering as this is considered normal wear and tear f transit damage initial installation costs removal costs or reinstallation costs EXPRESS CONTROLS LLC WILL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENT...

Page 25: ...500 Z Wave Production Programmer Tester www ExpressControls com February 2018 Bringing the Internet of Things IoT to Life 25 Document History Revision Date Description 1 1 00 2 18 2018 Initial Beta Version ...

Reviews: