SlideShare a Scribd company logo
1 of 57
Download to read offline
INTERNAL
NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V.
ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V.
R E V S E P T E M B E R 2 , 2 0 2 2
A U G U S T 1 , 2 0 2 2
Roman Budek
DEBUG I2C
1
CUSTOMER UNDER NDA
METHODS
• MKE15 Transmit and Receive Boards
• I2C Packet Sniffer
• I2C Data Generator
• Logic Analyzer
• Oscilloscope
• How to program
2
CUSTOMER UNDER NDA
2
INTERNAL
NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V.
ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V.
MKE15 Board
3
CUSTOMER UNDER NDA
FRDM-KE15Z HEADERS
J2
J1
J3
J4
J2 pinout in manual is wrong
Corrected are in red
20
18
16
14
12
10
8
6
4
2
x x x
J15 set to 3.3V operation
Use this USB connection
4
CUSTOMER UNDER NDA
FRDM-KE15Z CONNECTIONS
• Using I2C examples
• Default configuration
▪ Pin Name Board Location
▪ LPI2C0_SCL J4-12
▪ LPI2C0_SDA J4-10
▪ GND J3-12
5
CUSTOMER UNDER NDA
MKE15 MASTER SLAVE TEST
• One board communicates to another
Master
Slave
Sends to address 0xFC
0x01 0x20
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f
0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f
0x01
Sends to address 0xFD
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f
0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f
6
CUSTOMER UNDER NDA
LOGIC ANALYZER
• Confirms Data
• All valid format
• Expected data sequence
I2C Protocol needs to be set to shifted so that address shows up properly
7
CUSTOMER UNDER NDA
CUSTOMER DRIVER DEBUG
• Insert MKE15 as I2C Master
• See how many bytes customer software driver receives
• Does it consistently fail
Master
Sends to address 0xFC
0x01 0x20
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f
0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f
0x01
Customer Board
8
CUSTOMER UNDER NDA
LIVE DEMO
• Board Setup
9
CUSTOMER UNDER NDA
LIVE DEMO
• Jumpers
• Permit multiple
combination of connecting
boards, monitors, and logic
analyzer to SDA and SCL
pins
• Two male and two female
headers
1 0
CUSTOMER UNDER NDA
LIVE DEMO
• Video
• https://youtu.be/8KFbyFrBC38
1 1
CUSTOMER UNDER NDA
1 1
INTERNAL
NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V.
ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V.
I2C Data Generator
1 2
CUSTOMER UNDER NDA
I2C GENERATOR
• Default configuration for BUS1 connector
▪ Pin Name Board Location
▪ SCL CN17-1
▪ SDA CN17-3
▪ GND CN17-10
1 3
CUSTOMER UNDER NDA
JUMPER SETTINGS
NXP FM+ Jumper Settings 20220808_030433.jpg
1 4
CUSTOMER UNDER NDA
JUMPER SETTINGS
Install this jumper
1 5
CUSTOMER UNDER NDA
TEST WITH PCA9672
• PCA9672
− Soldered down on board
− Address 0x44
− Hardwired to SDA1 and
SCL1
− Easy to probe same test
points
• Set I2C Clock to 100K
since default is 1MHz
• Pick GPIO Expander 8
bit
• Connect Logic Analyzer
• Press Write and Read a
few times
1 6
CUSTOMER UNDER NDA
LOGIC ANALYZER
• Confirms valid data
1 7
CUSTOMER UNDER NDA
EMULATE MKE15 MASTER BOARD
• Use Expert Mode
• Enter Script
• Will write and read data
1 8
CUSTOMER UNDER NDA
LOGIC ANALYZER ON THE SCRIPT
• If no MCU connected (slave address) then NAK
• No further data is sent until the slave gets connected even if the TX buffer has more
bytes to send
No device with this address so data does not get sent
1 9
CUSTOMER UNDER NDA
CONNECT MCU
• Script emulates data exactly to MKE15 Slave Board
2 0
CUSTOMER UNDER NDA
LOGIC ANALYZER ON THE SCRIPT
• With MCU connected
• Data is emulated perfectly
Handshake protocol, not sure what this field is
32 bytes (0x20) of payload data
Start of sequential data
Slave ACK being present
2 1
CUSTOMER UNDER NDA
LOGIC ANALYZER ON THE SCRIPT (PG 2)
• Matches MCU perfectly
2 2
CUSTOMER UNDER NDA
DEMO WITH DATA GENERATOR SCRIPT
• Another way to debug
• MKE15 board is slave or
customer board
• NXP I2C board generates
scripts of messages
• Video demo
− https://youtu.be/bMR1p0zF6cI
Master Board
FRDM MKE15 is the slave
Logic Analyzer on tap points
NXP FM+ Jumper Settings 20220808_030433.jpg
2 3
CUSTOMER UNDER NDA
NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V.
ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V. 2 3
INTERNAL
Using I2C Driver
2 4
CUSTOMER UNDER NDA
MONITOR I2C TRAFFIC
• Use two MKE15 in Master/Slave
configuration
• Use I2C Driver GUI Tool
• Place splice so that all lines can be
monitored (Gnd, SCL, SDA) and no VCC
• Slave
− Board on right
− Running with MCU Xpresso for data monitor
• Master
− Always powered up
− Flashed
• Sequence
− Start slave software
− Press reset button on Master board
2 5
CUSTOMER UNDER NDA
MONITOR I2C TRAFFIC
• Use two MKE15 in Master/Slave
configuration
• Use GUI Tool
− Turning on pull ups when already enabled will
really mess it up
− Make sure speed is set correctly
• Now place into Monitor mode
− Screen will say “M”
− GUI will gray out
• Monitor Screen
− shows data being written and read back every
byte
− Data is in sequential order
− Slave was turned off
− Display is correct because every byte sent
(green ACK) is followed by red NAK since no
slave
− Not sure why address is wrong
2 6
CUSTOMER UNDER NDA
MONITOR I2C TRAFFIC
• Place into Capture Mode
− Works best if power off board, exit GUI, power on board, start GUI
− Might have to run GUI second time if first copy does not execute
− On the GUI, setup resistors and buss speed right away
− On the GUI, select Capture mode right away
− Enter file name for CSV
− Screen will show “C”
− If no C, then it will not work properly and go back to step 1
• Do NOT try to go back to monitor mode
• When done capturing
− Close capture by pressing button on GUI
− GUI should report how many events (65 in this example)
− Display should go back to “D”
2 7
CUSTOMER UNDER NDA
MONITOR I2C TRAFFIC
• Captured log
seems reasonable
• But it shows bytes
being
acknowledged
before end of data
• Logic Analyzer
data is a bit
different
• Need to do
decimal to hex on
data
Capture MKE15 Slave Master4 2022_08_09.csv
2 8
CUSTOMER UNDER NDA
COMPARE I2C DRIVER TO LOGIC ANALYZER
• Tap I2C Driver and Logic Analyzer to look at data
Master
Sends to address 0x7E
0x01 0x20
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f
0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f
0x01
Slave
I2C Driver Logic Analyzer
SCL, SDA, GND
2 9
CUSTOMER UNDER NDA
COMPARE I2C DRIVER TO LOGIC ANALYZER
• Physical Setup
• Two MKE15 boards
− Master will be executed by
pressing reset button near
USB
− Slave on left will be
executed with MCU
Xpresso Code
• I2C Driver Connected in
Capture Mode
• Logic Analyzer also
connected
3 0
CUSTOMER UNDER NDA
COMPARE I2C DRIVER TO LOGIC ANALYZER
• Cable connections
• Yellow is SCL
• Green is SDA
• Black is Ground
3 1
CUSTOMER UNDER NDA
USING DATA GENERATOR SCRIPT
• NXP I2C board generates
scripts of messages
• Compare Logic Analyzer to I2C
Driver
• Use On Board PCA9672
• Video demo
−
Master Device
NXP FM+ Jumper Settings 20220808_030433.jpg
Slave Device
PCA9672
3 2
CUSTOMER UNDER NDA
I2C DRIVER
• Using screen provides some kind of capture
• Only small bits of data
3 3
CUSTOMER UNDER NDA
DATA GENERATOR SCRIPT
• Control a PN7160 NFC reader
• Write commands to see how they work
• Need to use GPIO extended to toggle the IRQ and VEN pins
Sends to address 0x50
NCI >> 20 00 01 01
NCI >> 20 01 00
NCI >> 20 02 05 01 00 02 fe 01
NCI >> 20 03 03 01 a0 14
NCI >> 20 00 01 00
NCI >> 20 01 00
NCI >> 2f 02 00
NCI >> 21 00 10 05 01 01 01 02 01 01 03 01 01 04 01 02 80 01 80
NCI >> 21 03 07 03 00 01 02 01 00 01
3 4
CUSTOMER UNDER NDA
SETUP FOR SCRIPT
• PN7160 Script for
Discovery
2022_08_12.txt
3 5
CUSTOMER UNDER NDA
I2C DRIVER
• Control a PN7160 NFC reader
• Write commands to see how they work
Sends to address 0x50
NCI >> 20 00 01 01
NCI >> 20 01 00
NCI >> 20 02 05 01 00 02 fe 01
NCI >> 20 03 03 01 a0 14
NCI >> 20 00 01 00
NCI >> 20 01 00
NCI >> 2f 02 00
NCI >> 21 00 10 05 01 01 01 02 01 01 03 01 01 04 01 02 80 01 80
NCI >> 21 03 07 03 00 01 02 01 00 01
3 6
CUSTOMER UNDER NDA
I2C DRIVER
• Could not get this setup to work
• Logic Analyzer showed lots of communication happening on the buss
3 7
CUSTOMER UNDER NDA
COMPARE I2C DRIVER TO LOGIC ANALYZER
• Tap I2C Driver and Logic Analyzer to look at data
• Actual NFC Discovery
Master
Sends to address 0x50
NCI >> 20 00 01 01
NCI << 40 00 01 00
NCI << 60 00 09 02 01 20 04 04 71 12
50 05
NCI >> 20 01 00
Slave
I2C Driver Logic Analyzer
SCL, SDA, GND also VEN, IRQ
3 8
CUSTOMER UNDER NDA
COMMAND LOG
Running the NXP-NCI project.
NCI >> 20 00 01 01
NCI << 40 00 01 00
NCI << 60 00 09 02 01 20 04 04 71 12 50 05
NCI >> 20 01 00
NCI << 40 01 1e 00 1a 7e 06 03 01 d0 02 ff ff 01 ff 00 08 00 00 01 00 02 00 03 00 80 00 82 00 83 ...
NCI >> 20 02 05 01 00 02 fe 01
NCI << 40 02 02 00 00
NCI >> 20 03 03 01 a0 14
NCI << 40 03 25 00 01 a0 14 20 54 75 65 20 4a 75 6c 20 32 36 20 31 33 3a 32 32 3a 34 34 20 32 30 ...
NCI >> 20 00 01 00
NCI << 40 00 01 00
NCI << 60 00 09 02 00 20 04 04 71 12 50 05
NCI >> 20 01 00
NCI << 40 01 1e 00 1a 7e 06 03 01 d0 02 ff ff 01 ff 00 08 00 00 01 00 02 00 03 00 80 00 82 00 83 ...
NCI >> 2f 02 00
NCI << 4f 02 05 00 00 01 aa dd
NCI >> 21 00 10 05 01 01 01 02 01 01 03 01 01 04 01 02 80 01 80
NCI << 41 00 01 00
NCI >> 21 03 07 03 00 01 02 01 00 01
NCI << 41 03 01 00
3 9
CUSTOMER UNDER NDA
MKE15 WITH PN7160
• All communications and then Discovery mode
MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
4 0
CUSTOMER UNDER NDA
MKE15 WITH PN7160
• Reset condition
• Execute code in Debugger
MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
4 1
CUSTOMER UNDER NDA
MKE15 WITH PN7160
• First NCI command written to PN7160
• Unshifted Address is 0x50 might be 0x28 on I2C sniffer
MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
4 2
CUSTOMER UNDER NDA
MKE15 WITH PN7160
• 54mS from transmit until receive message
• IRQ low
MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
4 3
CUSTOMER UNDER NDA
MKE15 WITH PN7160
• IRQ low 36.14mS after last transmit
MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
4 4
CUSTOMER UNDER NDA
MKE15 WITH PN7160
• All 4 bytes count as one line in the NCI read
• IRQ goes low
MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
4 5
CUSTOMER UNDER NDA
MKE15 WITH PN7160
• IRQ goes high
• Does another read
• All 12 bytes are one line
MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
4 6
CUSTOMER UNDER NDA
MKE15 WITH PN7160
• Second read, second write, third read
MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
4 7
CUSTOMER UNDER NDA
MKE15 WITH PN7160
• Second write command
MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
4 8
CUSTOMER UNDER NDA
4 8
INTERNAL
NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V.
ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V.
I2C Driver with
LPC804 as I2C Slave
4 9
CUSTOMER UNDER NDA
I2C DRIVER WITH LPC804 I2C SLAVE
• I2C Driver will act as I2C Master
− Use GUI to send commands
− Monitor I2C Traffic
• LPC804
− Act as a programmable I2C Slave
− Address can be programmed
− Commands can be parsed
− Register simulation to get back actual values
5 0
CUSTOMER UNDER NDA
LPC804 SOFTWARE
• Start with code from Hackster I/O Site
• https://www.hackster.io/ktown/lpc845-i2c-co-processor-698c43#toc-i2c-slave-engine-2
5 1
CUSTOMER UNDER NDA
LPC804 BOARD
• Has convenient pinouts for I2C on a header
• I2C pull up resistors already mounted
• Can be battery powered, which is very convenient as a test instrument
• Slight software rewrite to work with this board
SCL, SDA, GND
5 2
CUSTOMER UNDER NDA
5 2
INTERNAL
NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V.
ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V.
External
Programming
5 3
CUSTOMER UNDER NDA
RECOMMENDATION FOR EXTERNAL PROGRAMMING
• Board powers itself up
• Tester provides SCL, SDA, and Ground connections
• Logic Analyzer capture of SCL, SDA, and Ground with possible Vdd
Tester
SCL, SDA, and GND
Board Under Test
PMIC
Power
Logic Analyzer
Vdd
5 4
CUSTOMER UNDER NDA
CUSTOMER DESIGN
• Board powers itself up
• Tester communicates using UART
• Logic Analyzer capture of SCL, SDA, and Ground with possible Vdd
Tester
Board Under Test
PMIC Power
Logic Analyzer
Vdd
Customer
MCU
SCL, SDA,
and GND
UART
5 5
CUSTOMER UNDER NDA
LOGIC ANALYZER EXAMPLE
• Example of I2C data capture
• Need to check if byte ACK sent by NXP device
Handshake protocol, not sure what this field is
32 bytes (0x20) of payload data
Start of sequential data
Slave ACK being present
Unshifted address
Slave ACK every byte
NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V. ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V.

More Related Content

Similar to NXP Debug I2C 2022_08_07.pdf

I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23Techvilla
 
4 bit lcd_interfacing_with_arm7_primer
4 bit lcd_interfacing_with_arm7_primer4 bit lcd_interfacing_with_arm7_primer
4 bit lcd_interfacing_with_arm7_primerpvmistary
 
4 bit lcd_interfacing_with_arm7_primer
4 bit lcd_interfacing_with_arm7_primer4 bit lcd_interfacing_with_arm7_primer
4 bit lcd_interfacing_with_arm7_primerpvmistary
 
technical report presents a comprehensive study. .pptx
technical report presents a comprehensive study. .pptxtechnical report presents a comprehensive study. .pptx
technical report presents a comprehensive study. .pptxMostafaKhaled78
 
microbit Microbit programming Microbit programming
microbit Microbit programming Microbit programmingmicrobit Microbit programming Microbit programming
microbit Microbit programming Microbit programmingssuser5feb2c1
 
Digital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportDigital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportAkash Mhankale
 
Tft touch screen manufacturers
Tft touch screen manufacturersTft touch screen manufacturers
Tft touch screen manufacturersKeatonParker2
 
Digital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontrollerDigital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontrollerSaylee joshi
 
CONFidence 2014: Alexander Timorin: SCADA deep inside: protocols and security...
CONFidence 2014: Alexander Timorin: SCADA deep inside: protocols and security...CONFidence 2014: Alexander Timorin: SCADA deep inside: protocols and security...
CONFidence 2014: Alexander Timorin: SCADA deep inside: protocols and security...PROIDEA
 
SCADA deep inside: protocols and security mechanisms
SCADA deep inside: protocols and security mechanismsSCADA deep inside: protocols and security mechanisms
SCADA deep inside: protocols and security mechanismsAleksandr Timorin
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentFastBit Embedded Brain Academy
 
Keypad Interfaced ZigBee Based Security System
Keypad Interfaced ZigBee Based Security SystemKeypad Interfaced ZigBee Based Security System
Keypad Interfaced ZigBee Based Security SystemEbadullah A
 
Rfid based attendance system using arduino (1)
Rfid based attendance system using arduino (1)Rfid based attendance system using arduino (1)
Rfid based attendance system using arduino (1)AWANISHKUMAR84
 

Similar to NXP Debug I2C 2022_08_07.pdf (20)

report cs
report csreport cs
report cs
 
I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23
 
digital clock atmega16
digital clock atmega16digital clock atmega16
digital clock atmega16
 
4 bit lcd_interfacing_with_arm7_primer
4 bit lcd_interfacing_with_arm7_primer4 bit lcd_interfacing_with_arm7_primer
4 bit lcd_interfacing_with_arm7_primer
 
4 bit lcd_interfacing_with_arm7_primer
4 bit lcd_interfacing_with_arm7_primer4 bit lcd_interfacing_with_arm7_primer
4 bit lcd_interfacing_with_arm7_primer
 
technical report presents a comprehensive study. .pptx
technical report presents a comprehensive study. .pptxtechnical report presents a comprehensive study. .pptx
technical report presents a comprehensive study. .pptx
 
Gsm message display
Gsm message displayGsm message display
Gsm message display
 
microbit Microbit programming Microbit programming
microbit Microbit programming Microbit programmingmicrobit Microbit programming Microbit programming
microbit Microbit programming Microbit programming
 
Digital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportDigital Alarm Clock 446 project report
Digital Alarm Clock 446 project report
 
Tft touch screen manufacturers
Tft touch screen manufacturersTft touch screen manufacturers
Tft touch screen manufacturers
 
Digital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontrollerDigital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontroller
 
A TRAFFIC LIGHT CONTROL SYSTEM USING PROGRAMMABLE LOGIC CONTROLLER
A TRAFFIC LIGHT CONTROL SYSTEM USING PROGRAMMABLE LOGIC CONTROLLERA TRAFFIC LIGHT CONTROL SYSTEM USING PROGRAMMABLE LOGIC CONTROLLER
A TRAFFIC LIGHT CONTROL SYSTEM USING PROGRAMMABLE LOGIC CONTROLLER
 
CONFidence 2014: Alexander Timorin: SCADA deep inside: protocols and security...
CONFidence 2014: Alexander Timorin: SCADA deep inside: protocols and security...CONFidence 2014: Alexander Timorin: SCADA deep inside: protocols and security...
CONFidence 2014: Alexander Timorin: SCADA deep inside: protocols and security...
 
SCADA deep inside: protocols and security mechanisms
SCADA deep inside: protocols and security mechanismsSCADA deep inside: protocols and security mechanisms
SCADA deep inside: protocols and security mechanisms
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver development
 
Keypad Interfaced ZigBee Based Security System
Keypad Interfaced ZigBee Based Security SystemKeypad Interfaced ZigBee Based Security System
Keypad Interfaced ZigBee Based Security System
 
Stone i tech
Stone i techStone i tech
Stone i tech
 
Rfid based attendance system using arduino (1)
Rfid based attendance system using arduino (1)Rfid based attendance system using arduino (1)
Rfid based attendance system using arduino (1)
 
I2C introduction
I2C introductionI2C introduction
I2C introduction
 
chapter 4
chapter 4chapter 4
chapter 4
 

Recently uploaded

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 

Recently uploaded (20)

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 

NXP Debug I2C 2022_08_07.pdf

  • 1. INTERNAL NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V. ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V. R E V S E P T E M B E R 2 , 2 0 2 2 A U G U S T 1 , 2 0 2 2 Roman Budek DEBUG I2C
  • 2. 1 CUSTOMER UNDER NDA METHODS • MKE15 Transmit and Receive Boards • I2C Packet Sniffer • I2C Data Generator • Logic Analyzer • Oscilloscope • How to program
  • 3. 2 CUSTOMER UNDER NDA 2 INTERNAL NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V. ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V. MKE15 Board
  • 4. 3 CUSTOMER UNDER NDA FRDM-KE15Z HEADERS J2 J1 J3 J4 J2 pinout in manual is wrong Corrected are in red 20 18 16 14 12 10 8 6 4 2 x x x J15 set to 3.3V operation Use this USB connection
  • 5. 4 CUSTOMER UNDER NDA FRDM-KE15Z CONNECTIONS • Using I2C examples • Default configuration ▪ Pin Name Board Location ▪ LPI2C0_SCL J4-12 ▪ LPI2C0_SDA J4-10 ▪ GND J3-12
  • 6. 5 CUSTOMER UNDER NDA MKE15 MASTER SLAVE TEST • One board communicates to another Master Slave Sends to address 0xFC 0x01 0x20 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x01 Sends to address 0xFD 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f
  • 7. 6 CUSTOMER UNDER NDA LOGIC ANALYZER • Confirms Data • All valid format • Expected data sequence I2C Protocol needs to be set to shifted so that address shows up properly
  • 8. 7 CUSTOMER UNDER NDA CUSTOMER DRIVER DEBUG • Insert MKE15 as I2C Master • See how many bytes customer software driver receives • Does it consistently fail Master Sends to address 0xFC 0x01 0x20 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x01 Customer Board
  • 9. 8 CUSTOMER UNDER NDA LIVE DEMO • Board Setup
  • 10. 9 CUSTOMER UNDER NDA LIVE DEMO • Jumpers • Permit multiple combination of connecting boards, monitors, and logic analyzer to SDA and SCL pins • Two male and two female headers
  • 11. 1 0 CUSTOMER UNDER NDA LIVE DEMO • Video • https://youtu.be/8KFbyFrBC38
  • 12. 1 1 CUSTOMER UNDER NDA 1 1 INTERNAL NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V. ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V. I2C Data Generator
  • 13. 1 2 CUSTOMER UNDER NDA I2C GENERATOR • Default configuration for BUS1 connector ▪ Pin Name Board Location ▪ SCL CN17-1 ▪ SDA CN17-3 ▪ GND CN17-10
  • 14. 1 3 CUSTOMER UNDER NDA JUMPER SETTINGS NXP FM+ Jumper Settings 20220808_030433.jpg
  • 15. 1 4 CUSTOMER UNDER NDA JUMPER SETTINGS Install this jumper
  • 16. 1 5 CUSTOMER UNDER NDA TEST WITH PCA9672 • PCA9672 − Soldered down on board − Address 0x44 − Hardwired to SDA1 and SCL1 − Easy to probe same test points • Set I2C Clock to 100K since default is 1MHz • Pick GPIO Expander 8 bit • Connect Logic Analyzer • Press Write and Read a few times
  • 17. 1 6 CUSTOMER UNDER NDA LOGIC ANALYZER • Confirms valid data
  • 18. 1 7 CUSTOMER UNDER NDA EMULATE MKE15 MASTER BOARD • Use Expert Mode • Enter Script • Will write and read data
  • 19. 1 8 CUSTOMER UNDER NDA LOGIC ANALYZER ON THE SCRIPT • If no MCU connected (slave address) then NAK • No further data is sent until the slave gets connected even if the TX buffer has more bytes to send No device with this address so data does not get sent
  • 20. 1 9 CUSTOMER UNDER NDA CONNECT MCU • Script emulates data exactly to MKE15 Slave Board
  • 21. 2 0 CUSTOMER UNDER NDA LOGIC ANALYZER ON THE SCRIPT • With MCU connected • Data is emulated perfectly Handshake protocol, not sure what this field is 32 bytes (0x20) of payload data Start of sequential data Slave ACK being present
  • 22. 2 1 CUSTOMER UNDER NDA LOGIC ANALYZER ON THE SCRIPT (PG 2) • Matches MCU perfectly
  • 23. 2 2 CUSTOMER UNDER NDA DEMO WITH DATA GENERATOR SCRIPT • Another way to debug • MKE15 board is slave or customer board • NXP I2C board generates scripts of messages • Video demo − https://youtu.be/bMR1p0zF6cI Master Board FRDM MKE15 is the slave Logic Analyzer on tap points NXP FM+ Jumper Settings 20220808_030433.jpg
  • 24. 2 3 CUSTOMER UNDER NDA NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V. ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V. 2 3 INTERNAL Using I2C Driver
  • 25. 2 4 CUSTOMER UNDER NDA MONITOR I2C TRAFFIC • Use two MKE15 in Master/Slave configuration • Use I2C Driver GUI Tool • Place splice so that all lines can be monitored (Gnd, SCL, SDA) and no VCC • Slave − Board on right − Running with MCU Xpresso for data monitor • Master − Always powered up − Flashed • Sequence − Start slave software − Press reset button on Master board
  • 26. 2 5 CUSTOMER UNDER NDA MONITOR I2C TRAFFIC • Use two MKE15 in Master/Slave configuration • Use GUI Tool − Turning on pull ups when already enabled will really mess it up − Make sure speed is set correctly • Now place into Monitor mode − Screen will say “M” − GUI will gray out • Monitor Screen − shows data being written and read back every byte − Data is in sequential order − Slave was turned off − Display is correct because every byte sent (green ACK) is followed by red NAK since no slave − Not sure why address is wrong
  • 27. 2 6 CUSTOMER UNDER NDA MONITOR I2C TRAFFIC • Place into Capture Mode − Works best if power off board, exit GUI, power on board, start GUI − Might have to run GUI second time if first copy does not execute − On the GUI, setup resistors and buss speed right away − On the GUI, select Capture mode right away − Enter file name for CSV − Screen will show “C” − If no C, then it will not work properly and go back to step 1 • Do NOT try to go back to monitor mode • When done capturing − Close capture by pressing button on GUI − GUI should report how many events (65 in this example) − Display should go back to “D”
  • 28. 2 7 CUSTOMER UNDER NDA MONITOR I2C TRAFFIC • Captured log seems reasonable • But it shows bytes being acknowledged before end of data • Logic Analyzer data is a bit different • Need to do decimal to hex on data Capture MKE15 Slave Master4 2022_08_09.csv
  • 29. 2 8 CUSTOMER UNDER NDA COMPARE I2C DRIVER TO LOGIC ANALYZER • Tap I2C Driver and Logic Analyzer to look at data Master Sends to address 0x7E 0x01 0x20 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x01 Slave I2C Driver Logic Analyzer SCL, SDA, GND
  • 30. 2 9 CUSTOMER UNDER NDA COMPARE I2C DRIVER TO LOGIC ANALYZER • Physical Setup • Two MKE15 boards − Master will be executed by pressing reset button near USB − Slave on left will be executed with MCU Xpresso Code • I2C Driver Connected in Capture Mode • Logic Analyzer also connected
  • 31. 3 0 CUSTOMER UNDER NDA COMPARE I2C DRIVER TO LOGIC ANALYZER • Cable connections • Yellow is SCL • Green is SDA • Black is Ground
  • 32. 3 1 CUSTOMER UNDER NDA USING DATA GENERATOR SCRIPT • NXP I2C board generates scripts of messages • Compare Logic Analyzer to I2C Driver • Use On Board PCA9672 • Video demo − Master Device NXP FM+ Jumper Settings 20220808_030433.jpg Slave Device PCA9672
  • 33. 3 2 CUSTOMER UNDER NDA I2C DRIVER • Using screen provides some kind of capture • Only small bits of data
  • 34. 3 3 CUSTOMER UNDER NDA DATA GENERATOR SCRIPT • Control a PN7160 NFC reader • Write commands to see how they work • Need to use GPIO extended to toggle the IRQ and VEN pins Sends to address 0x50 NCI >> 20 00 01 01 NCI >> 20 01 00 NCI >> 20 02 05 01 00 02 fe 01 NCI >> 20 03 03 01 a0 14 NCI >> 20 00 01 00 NCI >> 20 01 00 NCI >> 2f 02 00 NCI >> 21 00 10 05 01 01 01 02 01 01 03 01 01 04 01 02 80 01 80 NCI >> 21 03 07 03 00 01 02 01 00 01
  • 35. 3 4 CUSTOMER UNDER NDA SETUP FOR SCRIPT • PN7160 Script for Discovery 2022_08_12.txt
  • 36. 3 5 CUSTOMER UNDER NDA I2C DRIVER • Control a PN7160 NFC reader • Write commands to see how they work Sends to address 0x50 NCI >> 20 00 01 01 NCI >> 20 01 00 NCI >> 20 02 05 01 00 02 fe 01 NCI >> 20 03 03 01 a0 14 NCI >> 20 00 01 00 NCI >> 20 01 00 NCI >> 2f 02 00 NCI >> 21 00 10 05 01 01 01 02 01 01 03 01 01 04 01 02 80 01 80 NCI >> 21 03 07 03 00 01 02 01 00 01
  • 37. 3 6 CUSTOMER UNDER NDA I2C DRIVER • Could not get this setup to work • Logic Analyzer showed lots of communication happening on the buss
  • 38. 3 7 CUSTOMER UNDER NDA COMPARE I2C DRIVER TO LOGIC ANALYZER • Tap I2C Driver and Logic Analyzer to look at data • Actual NFC Discovery Master Sends to address 0x50 NCI >> 20 00 01 01 NCI << 40 00 01 00 NCI << 60 00 09 02 01 20 04 04 71 12 50 05 NCI >> 20 01 00 Slave I2C Driver Logic Analyzer SCL, SDA, GND also VEN, IRQ
  • 39. 3 8 CUSTOMER UNDER NDA COMMAND LOG Running the NXP-NCI project. NCI >> 20 00 01 01 NCI << 40 00 01 00 NCI << 60 00 09 02 01 20 04 04 71 12 50 05 NCI >> 20 01 00 NCI << 40 01 1e 00 1a 7e 06 03 01 d0 02 ff ff 01 ff 00 08 00 00 01 00 02 00 03 00 80 00 82 00 83 ... NCI >> 20 02 05 01 00 02 fe 01 NCI << 40 02 02 00 00 NCI >> 20 03 03 01 a0 14 NCI << 40 03 25 00 01 a0 14 20 54 75 65 20 4a 75 6c 20 32 36 20 31 33 3a 32 32 3a 34 34 20 32 30 ... NCI >> 20 00 01 00 NCI << 40 00 01 00 NCI << 60 00 09 02 00 20 04 04 71 12 50 05 NCI >> 20 01 00 NCI << 40 01 1e 00 1a 7e 06 03 01 d0 02 ff ff 01 ff 00 08 00 00 01 00 02 00 03 00 80 00 82 00 83 ... NCI >> 2f 02 00 NCI << 4f 02 05 00 00 01 aa dd NCI >> 21 00 10 05 01 01 01 02 01 01 03 01 01 04 01 02 80 01 80 NCI << 41 00 01 00 NCI >> 21 03 07 03 00 01 02 01 00 01 NCI << 41 03 01 00
  • 40. 3 9 CUSTOMER UNDER NDA MKE15 WITH PN7160 • All communications and then Discovery mode MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
  • 41. 4 0 CUSTOMER UNDER NDA MKE15 WITH PN7160 • Reset condition • Execute code in Debugger MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
  • 42. 4 1 CUSTOMER UNDER NDA MKE15 WITH PN7160 • First NCI command written to PN7160 • Unshifted Address is 0x50 might be 0x28 on I2C sniffer MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
  • 43. 4 2 CUSTOMER UNDER NDA MKE15 WITH PN7160 • 54mS from transmit until receive message • IRQ low MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
  • 44. 4 3 CUSTOMER UNDER NDA MKE15 WITH PN7160 • IRQ low 36.14mS after last transmit MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
  • 45. 4 4 CUSTOMER UNDER NDA MKE15 WITH PN7160 • All 4 bytes count as one line in the NCI read • IRQ goes low MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
  • 46. 4 5 CUSTOMER UNDER NDA MKE15 WITH PN7160 • IRQ goes high • Does another read • All 12 bytes are one line MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
  • 47. 4 6 CUSTOMER UNDER NDA MKE15 WITH PN7160 • Second read, second write, third read MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
  • 48. 4 7 CUSTOMER UNDER NDA MKE15 WITH PN7160 • Second write command MKE15 to PN7160 All Signals Proper TVDD Register 2022_08_12.sr
  • 49. 4 8 CUSTOMER UNDER NDA 4 8 INTERNAL NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V. ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V. I2C Driver with LPC804 as I2C Slave
  • 50. 4 9 CUSTOMER UNDER NDA I2C DRIVER WITH LPC804 I2C SLAVE • I2C Driver will act as I2C Master − Use GUI to send commands − Monitor I2C Traffic • LPC804 − Act as a programmable I2C Slave − Address can be programmed − Commands can be parsed − Register simulation to get back actual values
  • 51. 5 0 CUSTOMER UNDER NDA LPC804 SOFTWARE • Start with code from Hackster I/O Site • https://www.hackster.io/ktown/lpc845-i2c-co-processor-698c43#toc-i2c-slave-engine-2
  • 52. 5 1 CUSTOMER UNDER NDA LPC804 BOARD • Has convenient pinouts for I2C on a header • I2C pull up resistors already mounted • Can be battery powered, which is very convenient as a test instrument • Slight software rewrite to work with this board SCL, SDA, GND
  • 53. 5 2 CUSTOMER UNDER NDA 5 2 INTERNAL NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V. ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V. External Programming
  • 54. 5 3 CUSTOMER UNDER NDA RECOMMENDATION FOR EXTERNAL PROGRAMMING • Board powers itself up • Tester provides SCL, SDA, and Ground connections • Logic Analyzer capture of SCL, SDA, and Ground with possible Vdd Tester SCL, SDA, and GND Board Under Test PMIC Power Logic Analyzer Vdd
  • 55. 5 4 CUSTOMER UNDER NDA CUSTOMER DESIGN • Board powers itself up • Tester communicates using UART • Logic Analyzer capture of SCL, SDA, and Ground with possible Vdd Tester Board Under Test PMIC Power Logic Analyzer Vdd Customer MCU SCL, SDA, and GND UART
  • 56. 5 5 CUSTOMER UNDER NDA LOGIC ANALYZER EXAMPLE • Example of I2C data capture • Need to check if byte ACK sent by NXP device Handshake protocol, not sure what this field is 32 bytes (0x20) of payload data Start of sequential data Slave ACK being present Unshifted address Slave ACK every byte
  • 57. NXP, THE NXP LOGO AND NXP SECURE CONNECTIONS FOR A SMARTER WORLD ARE TRADEMARKS OF NXP B.V. ALL OTHER PRODUCT OR SERVICE NAMES ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS. © 2020 NXP B.V.