Skip to content

Commit c76c3b2

Browse files
committed
adding screenshots and minor debug updates
1 parent 456fe02 commit c76c3b2

File tree

5 files changed

+22
-1
lines changed

5 files changed

+22
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
__pycache__
22
.idea
33
.*.sw*
4+
*.code-workspace

assets/txn_analyzer_example.png

42.1 KB
Loading

assets/txn_analyzer_settings.png

65.1 KB
Loading

i2c_transactions.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def __init__(self):
7373
If you have any initialization to do before any methods are called, you can do it here.
7474
'''
7575
self.prev_frame = None
76+
self.current_frame = None
7677
self.current_transaction = None
7778
self._debug = False
7879

@@ -158,7 +159,10 @@ def process_transaction(self):
158159
if address_key in self.current_map.keys():
159160
register_name = self.current_map[address_key]['name']
160161
else:
161-
register_name = "UNKNOWN[%s]"%hex(address_key)
162+
register_name = "UNKNOWN[%s]"%hex(address_byte)
163+
print("\tUNKNOWN: ", hex(address_byte))
164+
print("\tUNKNOWN: frame:", str(self.current_frame))
165+
print("\tUNKNOWN: transaction:", str(txn))
162166

163167
txn.register_name = register_name
164168
txn.register_address = address_byte
@@ -203,8 +207,10 @@ def _process_stop_frame(self, frame):
203207
return new_frame
204208

205209
def decode(self, frame):
210+
self.current_frame = frame
206211
new_frame = None
207212
frame_type = frame['type']
213+
208214
if self._debug: print(frame_type.upper())
209215

210216
if frame_type == 'start': # begin new transaction or repeated start

register_map_v1.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,20 @@
392392
"GYRO_FCHOICE"]
393393
},
394394

395+
"16": {
396+
"name": "ACCEL_SMPLRT_DIV_1",
397+
"rw": "R/W",
398+
"fields": [
399+
"ACCEL_SMPLRT_DIV[11:8]",
400+
"ACCEL_SMPLRT_DIV[11:8]",
401+
"ACCEL_SMPLRT_DIV[11:8]",
402+
"ACCEL_SMPLRT_DIV[11:8]",
403+
"ACCEL_SMPLRT_DIV[11:8]",
404+
"ACCEL_SMPLRT_DIV[11:8]",
405+
"ACCEL_SMPLRT_DIV[11:8]",
406+
"ACCEL_SMPLRT_DIV[11:8]"
407+
]
408+
},
395409
"20": {
396410
"name": "ACCEL_CONFIG",
397411
"rw": "R/W",

0 commit comments

Comments
 (0)