ETP 521 Using adb to test SPI between OCURA and DRONA

Revision for “ETP 521 Using adb to test SPI between OCURA and DRONA” created on December 19, 2015 @ 20:40:56

ETP 521 Using adb to test SPI between OCURA and DRONA
&nbsp; <h6>1. PURPOSE / DESCRIPTION</h6> 1.1 To test SPI communication (read and write) between DRONA and OCURA, using adb shell <h6>2. TEST SET-UP</h6> 2.1 Drona: <a href=""></a>, version: 816ee47 2.1.1 SPI is slave 2.1.2 Need to connect to ICD to run in debug mode 2.2 OCURA board with android installed <h6>3. PROCEDURE</h6> 3.1 Create a hex file (binary file) with desired 32 byte 3.1.1 Download HxD: <a href=""></a> (read/write binary file), and launch it 3.1.2 Set bytes per low to 32, and type in any data you want, then save that (the file extension can be ignored) <a href=""><img class="alignnone wp-image-198 size-full" src="" alt="p11" width="878" height="160" /></a> 3.2 Connect PC to OCURA with USB cable, using command window, type in adb devices to see if the OCURA can be detected. (Refer to ETP 514 for attribute usage) 3.3 Copy the hex file to WiRa: 3.3.1 <em><strong>adb push filename /sdcard/</strong></em> 3.3.2 note that the <em>/sdcard/ directory</em> is not the real SD card, it’s located in the first directory of USB storage 3.4 Type in “<em><strong>adb shell</strong></em>” to enter the command line mode of Android 3.5 Navigate to<em> /sys/bus/spi/drivers/marc_basic/spi0.1</em> 3.6 Enable SPI using <em><strong>echo “-I” &gt; spi</strong></em> 3.7 Write file to transfer (MOSI) 3.7.1 <em><strong>cat /sdcard/filename &gt; transfer</strong></em> 3.7.2 Pause the code (either pause and set any breakpoint) 3.7.3 Check DRONA variable “<em><strong>WRRXPacket</strong></em>” using “New Watch” (See 3.9 the picture in the next page) 3.7.4 The result should be the same as what we have set in the hex file 3.8 Read file to transfer (MISO) 3.8.1 <em><strong>cat transfer &gt; /sdcard/filename</strong> </em> 3.8.2 Copy the file from WiRa to PC (You can enable the USB storage and directly copy the file out 3.8.3 Check if the data in it is correct. If the MOSI data from OCURA is meaningless for DRONA, then OCURA would receive 32 bytes of 0x55 (See 3.10 the picture in the next page) 3.9 <img class="alignnone wp-image-196 size-full" src="" alt="p12" width="1069" height="597" /> 3.10 <a href=""><img class="alignnone wp-image-197 size-full" src="" alt="" width="1141" height="156" /></a>

OldNewDate CreatedAuthorActions
December 19, 2015 @ 20:40:56 admin
December 19, 2015 @ 20:40:45 [Autosave] admin
November 18, 2015 @ 15:06:24 Wanchen
November 17, 2015 @ 21:24:46 Wanchen
November 10, 2015 @ 21:33:14 [Autosave] Wanchen
November 10, 2015 @ 20:43:54 Wanchen