From 6faf1f15a9024741522a9662221d633b8261b2d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caroline=20Sandsbr=C3=A5ten?= Date: Thu, 2 Oct 2025 14:59:29 +0200 Subject: [PATCH] update title of jupyter notebook lab 1 --- jupyter/1 - Connecting to Hardware.ipynb | 62 ++++++++++++++---------- jupyter/lab/1_SCA_Lab/SCA_lab.ipynb | 2 +- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/jupyter/1 - Connecting to Hardware.ipynb b/jupyter/1 - Connecting to Hardware.ipynb index 030cddb4..2992d133 100644 --- a/jupyter/1 - Connecting to Hardware.ipynb +++ b/jupyter/1 - Connecting to Hardware.ipynb @@ -171,7 +171,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -196,7 +196,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -214,24 +214,21 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "scope.gain.mode changed from low to high \n", "scope.gain.gain changed from 0 to 22 \n", "scope.gain.db changed from 15.0 to 25.091743119266056 \n", "scope.adc.samples changed from 131124 to 5000 \n", "scope.clock.clkgen_freq changed from 0 to 7363636.363636363 \n", "scope.clock.adc_freq changed from 0 to 29454545.454545453 \n", - "scope.clock.adc_rate changed from 0.0 to 29454545.454545453 \n", "scope.io.tio1 changed from serial_tx to serial_rx \n", "scope.io.tio2 changed from serial_rx to serial_tx \n", "scope.io.hs2 changed from None to clkgen \n", - "scope.io.cdc_settings changed from [1, 0, 0, 0] to [0, 0, 0, 0] \n", "scope.glitch.phase_shift_steps changed from 0 to 4592 \n", "scope.trace.capture.trigger_source changed from trace trigger, rule #0 to firmware trigger \n" ] @@ -279,7 +276,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -393,7 +390,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ @@ -403,6 +400,11 @@ "cw.program_target(scope, cw.programmers.SAM4SProgrammer, \"../firmware/mcu/simpleserial-base/simpleserial-base-CWHUSKY.hex\")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, { "cell_type": "markdown", "metadata": {}, @@ -431,11 +433,11 @@ }, { "cell_type": "code", - "execution_count": 56, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ - "msg = bytearray([0]*16) #simpleserial uses bytearrays\n", + "msg = bytearray([1]*16) #simpleserial uses bytearrays\n", "target.simpleserial_write('p', msg)" ] }, @@ -448,14 +450,14 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": 25, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "bytearray(b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00')\n" + "bytearray(b'\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01')\n" ] } ], @@ -472,7 +474,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -488,7 +490,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 27, "metadata": {}, "outputs": [ { @@ -518,11 +520,11 @@ }, { "cell_type": "code", - "execution_count": 58, + "execution_count": 55, "metadata": {}, "outputs": [], "source": [ - "target.write('k' + \"01\"*16) #fill in the rest here" + "target.write('p' + \"00\"*16 + \"\\n\") #fill in the rest here" ] }, { @@ -534,7 +536,7 @@ }, { "cell_type": "code", - "execution_count": 59, + "execution_count": 56, "metadata": {}, "outputs": [], "source": [ @@ -543,13 +545,15 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": 57, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ + "r00000000000000000000000000000000\n", + "z00\n", "\n" ] } @@ -600,17 +604,25 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 15, "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "(ChipWhisperer Scope WARNING|File _OpenADCInterface.py:732) Timeout in OpenADC capture(), no trigger seen! Trigger forced, data is invalid. Status: 13\n", + "(ChipWhisperer Scope WARNING|File _OpenADCInterface.py:732) Timeout in OpenADC capture(), no trigger seen! Trigger forced, data is invalid. Status: 12\n" + ] + }, { "data": { "text/plain": [ - "array([-0.31274414, -0.30932617, -0.09838867, ..., 0.12280273,\n", - " 0.10131836, 0.16748047])" + "array([ 0.16430664, 0.13574219, 0.13989258, ..., -0.3137207 ,\n", + " -0.29541016, -0.1315918 ])" ] }, - "execution_count": 64, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -654,7 +666,7 @@ }, { "cell_type": "code", - "execution_count": 65, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -674,7 +686,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "cw-work", "language": "python", "name": "python3" }, @@ -688,7 +700,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.14" + "version": "3.13.7" } }, "nbformat": 4, diff --git a/jupyter/lab/1_SCA_Lab/SCA_lab.ipynb b/jupyter/lab/1_SCA_Lab/SCA_lab.ipynb index bc34a718..9d989d17 100644 --- a/jupyter/lab/1_SCA_Lab/SCA_lab.ipynb +++ b/jupyter/lab/1_SCA_Lab/SCA_lab.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Lab 2\n" + "# SCA Lab\n" ] }, {