458
edits
As of August 2020 the site you are on (wiki.newae.com) is deprecated, and content is now at rtfm.newae.com. |
Changes
no edit summary
Assuming this setup is complete, you can confirm you are able to communicate with the hardware by running the example capture of traces given in the [[CW1173_ChipWhisperer-Lite]] quick-start.
Note with the CW1173 you need to configure a clock before programming of the device will succeed. Programming of the target device will be done as part of the CW-Capture software setup, discussed next.
Next, open the CW-Capture software. Then perform the following steps:
[[File:01_genericsetupcwsetup_scriptselection.png|image889x889px]]
# Switch to the ''General SettingsPython Console'' tab.# As the ''Scope Module'', select the ''ChipWhisperer/OpenADC'' optionThe script selection window (2) lists available example scripts. Scroll down to "connect_cwlite_simpleserial.py" and click on it.# As You will see the ''Target Module'', select script contents appear in the ''Simple Serial'' option"Script Preview" window (3). You can either hit the "Run" button or double-click the filename of the script to execute it. Do either of those now.
[[File:02_cw1173_scopesetupcwsetup_scriptselection_cwliterun.png|image889x889px]]
<ol start="4" style="list-style-type: decimal;">
<li>Switch to The console lists the ''exact script that is executed. Note you could have manually executed the script commands line-by-line in this console.</li><li>The "Scope Settings'' tab" and "Target" buttons will show as connected.</li><li>As the ''The Status Bar will show a connection'', select the ''ChipWhisperer Lite'' protocol.</li></ol>
Line 8: Configures GPIO1 as the RX (Input). This is what the XMEGA target expects. Line 9: Configures GPIO2 as the TX (Output). This is what the XMEGA target expects. Line 10: Sets the "High-Speed 2" (HS2) pin as having the 7.37MHz clock output. <ol start="1214" style="list-style-type: decimal;"><li>Change the ''Target IO1'' function to be ''RXD''.</li><li>Change the ''Target IO2'' function to be ''TXD''.</li>
<li><p>You can now program the XMEGA device! To do so, open the XMEGA Programmer from the ''Tools'' menu:</p>
<p>[[File:cw1173_xmegaproga.png|image]]</p></li>
<li><p>Hit the ''Check Signature'' button and confirm the device is detected. If not you may have issues with the clock setup.</p>
<p>[[File:cw1173_xmegaprogb.png|image]]</p></li>
<li><p>Using the ''Find'' button, navigate to the <code>simpleserial-base-cw303.hex</code> which you built earlier with the <code>make</code> command. You can then press the ''Erase/Program/Verify'' button, and confirm the file is programmed into the XMEGA device:</p>
<p>[[File:cw1173_xmegaprogc.png|image]]</p>
<p>Note the programmer dialog not only shows the successful programming status, but also shows when the <code>.hex</code> file was last modified. Always confirm this matches with when you last remember compiling the program -- if it is widely different this suggests you have selected the wrong file!</p>
<p>Finally we can check communications with the programmed file:</p></li></ol>
[[File:Cw1173_connectrun09_Cw1173_connectrun.png|image]]
<ol start="17" style="list-style-type: decimal;">
<li>Open the status monitor under <i>Tools > Encryption Status Monitor</i>.</li>
<li>Resize the monitor window. The monitor will show sent & received data to the target.</li>
<li>Hit the ''Run 1'' button([[File:Capture One Button.PNG|image]]). You may have to hit it a few times, as the very first serial data is often lost. You should see data populate in the ''Text Out'' field of the monitor window. Note that each byte of the ''Text In'' is incremented in the ''Text Out'' field.</li></ol>