![Page 1: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/1.jpg)
Renesas Electronics America Inc.© 2012 Renesas Electronics America Inc. All rights reserved.
Class ID: Class ID: 3L03B
Scott Loring, Engineering Manager, Total Phase
Using Embedded Tools for I2C, SPI, and USB Debugging for the Renesas RX63N RDK
![Page 2: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/2.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.2
Scott Loring
Engineering Manager at Total Phase
Education
B.S. Computer Engineering from the University of California, Riverside
M.S. Electrical Engineering from Stanford University
Work Experience
10 years experience with embedded systems development
5 years at Total Phase designing hardware and software development tools
![Page 3: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/3.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.3
Renesas Technology & Solution Portfolio
![Page 4: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/4.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.4
Introduction to the Renesas RX63N RDK Introduction to Total Phase Development Tools Lab
Beagle protocol analyzers and Data Center SoftwareAardvark I2C/SPI Host Adapter and Flash Center SoftwareDevelopment Start UpBug 1: I2C LCD Bug 2: Read I2C
Q&A
Agenda
![Page 5: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/5.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.5
Renesas RX63N RDK
![Page 6: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/6.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.6
Renesas RX63N RDKJ-Link
debuggerExt. Power
5 VDC
Speaker
Stereo headphone jack
Expansion header
LED Ring
10/100 Ethernet(Opt. IEEE1588)
USB Host/Function
CAN transceiver
128 Mb PCM Memory
SD-Card
Application headerWiFi/Bluetooth
I2C/SPI Debug Connector
PMOD expansion
Graphics LCD
Digital sensorsTemp & Accel
User push buttons
POTVR1
MIC and amplifier
RS-232 Serial Port
Expansion header
![Page 7: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/7.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.7
Total Phase Development Tools
![Page 8: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/8.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.8
By using debugging tools manufactured by Total Phase, you can:
Debug in real time
Quickly evaluate embedded systems
Program EEPROMS and flash memories
Easily collaborate with colleagues
Maximize productivity
Total Phase Solutions
![Page 9: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/9.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.9
General purpose I2C/SPI master or slave
Active communication on the I2C bus up to 800 kHz
Active communication up to 8 MHz as an SPI master
and up to 4 MHz as an SPI slave
Aardvark I2C/SPIHost Adapter
Aardvark I2C/SPI Host Adapter
![Page 10: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/10.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.10
Designed to work with the Aardvark I2C/SPI Host Adapter
Read and Write I2C/SPI messages
XML Batch Script support
Built-in Help System
Multiple adapter support
Windows, Linux, Mac OS X
Control Center Software
![Page 11: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/11.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.11
Non-intrusively monitor an I2C or SPI bus
Interactive Real-Time Display, Filter, and Search
Monitors I2C data up to 4 MHz
Monitors SPI data up to 24 MHz
Beagle I2C/SPIProtocol Analyzer
Beagle I2C/SPI Protocol Analyzer
![Page 12: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/12.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.12
Non-intrusively monitor high-, full-, and low-speed USB 2.0
Interactive Real-Time Display, Filter, and Search
Real-time class-level decoding
64 MB on-board hardware buffer
Beagle USB 480Protocol Analyzer
Beagle USB 480 Protocol Analyzer
![Page 13: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/13.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.13
Designed to work with the Beagle Protocol Analyzers
LiveDisplay
LiveFilter
LiveSearch
32-bit and 64-bit support
Tree View and Block View
Windows, Linux, Mac OS X
Data Center Software
![Page 14: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/14.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.14
Lab Introduction
![Page 15: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/15.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.15
Lab Introduction
Beagle USB 480 Protocol Analyzer
Hub
Beagle I2C/SPI Protocol Analyzer
Aardvark I2C/SPI Host
Adapter
EEPROM Activity Board
Host Computer
External Power
Ribbon Cable
Renesas RX63N RDK
Physical Set Up
![Page 16: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/16.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.16
Logical Set Up
RX63N RDK
I2C EEPROM
I2C Bus
Beagle I2C/SPI Protocol Analyzer
PC
Aardvark I2C/SPIHost AdapterBeagle USB 480
Protocol Analyzer
USB
Lab Introduction
![Page 17: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/17.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.17
Beagle Protocol Analyzers
![Page 18: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/18.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.18
Objective: Introduce the Beagle protocol analyzers
Task: Set up and start a live capture using the Data Center Software
Beagle Protocol Analyzers
![Page 19: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/19.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.19
1. Open the Data Center Software.
2. Click Connect to Analyzer.
3. Select the I2C/SPI analyzer and Click OK.
Configuring the Beagle analyzer for use
Beagle Protocol Analyzers
![Page 20: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/20.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.20
4. Click Device Settings.
5. Change the capture protocol to I2C.
6. Set the sampling rate to 50 MHz.
7. Set the protocol lens to I2C.
Configuring the Beagle analyzer for use
Beagle Protocol Analyzers
![Page 21: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/21.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.21
4. Click Device Settings.
5. Change the capture protocol to I2C.
6. Set the sampling rate to 50 MHz.
7. Set the protocol lens to I2C.
8. Start the capture.
Configuring the Beagle analyzer for use
Beagle Protocol Analyzers
![Page 22: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/22.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.22
Aardvark I2C/SPI Host Adapter
![Page 23: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/23.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.23
Objective: Introduce Aardvark I2C/SPI Host Adapter.
Task: Use the Aardvark adapter and Flash Center Software to read and write from the I2C EEPROM.
Aardvark I2C/SPI Host Adapter
![Page 24: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/24.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.24
1. Open the Flash Center Software
2. Click on Add Adapters
3. Select Aardvark I2C/SPI Host Adapter
4. Click Add
Configuring the Aardvark I2C/SPI Host Adapter for use
Aardvark I2C/SPI Host Adapter
![Page 25: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/25.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.25
5. Turn on the Target Power button
6. Click on Choose Target to specify which part you will be using
Aardvark I2C/SPI Host Adapter
![Page 26: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/26.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.26
7. Select I2C EEPROM under Device Type
8. Under Manufacturer, select Atmel
9. Under Part Number, choose AT24C02
10. Click OK
Aardvark I2C/SPI Host Adapter
![Page 27: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/27.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.27
11. Click the Read Target icon
12. Click Erase
13. Select OK
14. Click Read Target again
Reading and Erasing the SPI EEPROM Contents
Aardvark I2C/SPI Host Adapter
![Page 28: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/28.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.28
15. Click the Clear button to clear the local buffer
16. Click into the ASCII editor
17. On the first line, type abcdefghijklmnop
Writing Data to the I2C EEPROM
Aardvark I2C/SPI Host Adapter
![Page 29: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/29.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.29
18. Select the Program and Verify icon
19. Click OK if presented with a warning about exceeding capacity
20. Verify the transactions in Data Center
Aardvark I2C/SPI Host Adapter
![Page 30: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/30.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.30
Development Start Up
![Page 31: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/31.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.31
Objective: Access the project content and application
Task: Load and set up the lab project using the e2Studio designed by Renesas
Development Start Up
![Page 32: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/32.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.32
1. Open e2Studio
2. Select Browse in the Workspace Launcher
3. Browse to C:\<PATH_TO_FILES>\e2studio-workspace\TPRX63N.work
Development Start Up
![Page 33: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/33.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.33
4. Select Project Build All
5. Select Run Debug (F11)
6. Select Go (F8)
Development Start Up
![Page 34: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/34.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.34
7. The “Renesas DevCon 2012” message will be displayed on the LCD along with a prompt to reinsert the USB cable.
Development Start Up
Beagle USB 480 Protocol Analyzer
Hub
Beagle I2C/SPI Protocol Analyzer
Aardvark I2C/SPI Host
Adapter
EEPROM Activity Board
Host Computer
External Power
Ribbon Cable
Renesas RX63N RDK
![Page 35: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/35.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.35
8. Reinsert the USB cable (near the Ethernet connector)
9. In the Windows ‘Found New HW wizard’, select “No, not this time” (If you are running Windows 7, Select “Browse my computer.”)
10.Click Next
Development Start Up
Installing the Driver
![Page 36: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/36.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.36
11.Select “Install from a specific location” (If you are running Windows 7, select “Let me pick.”).
12.Click Next
Development Start Up
Installing the Driver
![Page 37: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/37.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.37
13. If asked for the libusb driver, select ‘Browse’ and point to the directory <PATH>\material\libusb-drivers\x86.
Development Start Up
Installing the Driver
![Page 38: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/38.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.38
14.In Windows Device Manager, check that Windows has enumerated the RX properly. You should have it listed under the “libusb-win32 device” class
Development Start Up
Installing the Driver
![Page 39: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/39.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.39
15.Launch the RX63N LibUSB GUI by double-clicking the launcher
C:\<PATH_TO_FILES>\libusb-gui\launch.bat
Development Start Up
![Page 40: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/40.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.40
Bug 1 – I2C to LCD
![Page 41: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/41.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.41
Problem: The EEPROM data is incorrectly displayed on the LCD screen
Task: Use Total Phase tools to diagnose and solve the problem
Bug 1 – I2C to LCD
![Page 42: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/42.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.42
1. Click LibUSB Connect in the RX63N GUI.
Bug 1 – I2C to LCD
![Page 43: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/43.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.43
2. Click LED Control
3. Type Aardvark and click Write LCD
4. Click Clear LCD
5. Click I2C to LCD
Testing Application Functions
Bug 1 – I2C to LCD
![Page 44: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/44.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.44
Spend the next few minutes solving the bug in sending data from the EEPROM to the LCD
Beagle USB 480 Protocol Analyzer
Hub
Beagle I2C/SPI Protocol Analyzer
Aardvark I2C/SPI Host
Adapter
EEPROM Activity Board
Host Computer
External Power
Ribbon Cable
Renesas RX63N RDK
![Page 45: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/45.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.45
Using the Beagle I2C analyzer, we can quickly see this problem.
When we used Flash Center, the Data Center displays this transaction.
The first byte of data is 00. Remember that 00 is our offset.
When we click I2C to LCD, the Data Center displays these transactions.
Note that the data is being pushed to the LCD starting at offset 08. The correct offset is 00 as shown in the first write transaction.
Solution
Bug 1 – I2C to LCD
![Page 46: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/46.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.46
6. Make the corrections to source code in line 254.
253 case USB_LIBUSB_CMD_I2C_LCD:254 i2c_eeprom_read(0x50, 8, data, 12);255 lcd_display(LCD_LINE1, "I2C -> LCD");256 lcd_display(LCD_LINE2, data);257 break;
Correcting the source code and verifying the solution
Bug 1 – I2C to LCD
![Page 47: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/47.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.47
7. Save and rebuild the project referring to the handout
8. Click Connect in the Application Box
9. Click I2C to LCD to verify the solution.
Correcting the source code and verifying the solution
Bug 1 – I2C to LCD
![Page 48: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/48.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.48
Bug 2 - Read I2C
![Page 49: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/49.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.49
Problem: Data is incorrectly read from the EEPROM
Task: Use Total Phase tools to diagnose and solve the problem
Bug 2 – Read I2C
![Page 50: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/50.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.50
1. Click I2C to GUI
Writing and reading from the EEPROM
You can see the data is incorrectly displayed in the application.
Bug 2 – Read I2C
![Page 51: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/51.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.51
Spend the next few minutes solving the bug in reading data from the EEPROM.
Beagle USB 480 Protocol Analyzer
Hub
Beagle I2C/SPI Protocol Analyzer
Aardvark I2C/SPI Host
Adapter
EEPROM Activity Board
Host Computer
External Power
Ribbon Cable
Renesas RX63N RDK
![Page 52: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/52.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.52
Using the Beagle analyzers, we can quickly isolate this problem.
When we Read I2C, the Data Center displays these transactions.
Using the Details pane, we can see the data is being read correctly from the I2C EEPROM.
Evaluating the I2C data
Bug 2 – Read I2C
![Page 53: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/53.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.53
2. Open another Data Center Software
3. Click Connect to Analyzer.
4. Select the USB analyzer and Click OK.
Evaluating the USB data using the Beagle USB 480 analyzer
Bug 2 – Read I2C
![Page 54: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/54.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.54
5. Go to Capture Settings and adjust the Data Capture Limit to 700 MB
6. Start the Capture
Evaluating the USB data using the Beagle USB 480 analyzer
Bug 2 – Read I2C
![Page 55: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/55.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.55
7. Go to the Bus Pane
8. In e2studio click Reset then Go (F8)
9. Reinsert the USB cable
10. RX600 LibUSB Demo should appear in the bus pane
Reset the device to see the enumeration details
Bug 2 – Read I2C
![Page 56: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/56.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.56
11. Go to the Filter tab
12. Uncheck Collapsed & SOFs
13. Apply filter
Filter out extraneous USB data
Only data of interest is displayed in the capture log
Bug 2 – Read I2C
![Page 57: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/57.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.57
Spend the next few minutes analyzing the USB data to identify the bug.
Beagle USB 480 Protocol Analyzer
Hub
Beagle I2C/SPI Protocol Analyzer
Aardvark I2C/SPI Host
Adapter
EEPROM Activity Board
Host Computer
External Power
Ribbon Cable
Renesas RX63N RDK
![Page 58: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/58.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.58
Using the Beagle USB 480 analyzer, we can diagnose this problem.
When we Read I2C, the Data Center displays these input reports.
Using the Details pane, we can see the data is being read backwards over USB.
Evaluating the USB data
Bug 2 – Read I2C
![Page 59: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/59.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.59
14. Make the corrections to source code.
232 uint32_t usb_bulk_send_in_packet (uint16_t ip, int16_t fn, uint32_t val) {
233 USB_ER_t err_code; 234 int16_t state; 235 236 static uint8_t data[4]; 237 for (int i = 0, s = 0; i < 4; i++, s+=8)
{ 238 data[i] = (uint8_t)((val >> s) &
0xff); 239 } 240 write(fn, data, 4);
Correcting the source code and verifying the solution
Bug 2 – Read I2C
![Page 60: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/60.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.60
15. Save and rebuild the project referring to the handout
16. Click Connect in the GUI
17. Click I2C to GUI to verify the solution.
Correcting the source code and verifying the solution
Bug 2 – Read I2C
![Page 61: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/61.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.61
Questions and Answers
![Page 62: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/62.jpg)
© 2012 Renesas Electronics America Inc. All rights reserved.62
Please utilize the ‘Guidebook’ application to leave feedback
or
Ask me for the paper feedback form for you to use…
Please Provide Your Feedback…
![Page 63: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L03B Scott Loring, Engineering Manager, Total](https://reader035.vdocuments.us/reader035/viewer/2022062407/56649f575503460f94c7cb6f/html5/thumbnails/63.jpg)
Renesas Electronics America Inc.© 2012 Renesas Electronics America Inc. All rights reserved.