Skip to content

Commit eee4e08

Browse files
committed
Workaround for TT07 CB error: CTRL_SEL_nRST/CTRL_SEL_INC pins swapped
1 parent 38a8061 commit eee4e08

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/ttboard/demoboard.py

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import ttboard.util.time as time
1919
from ttboard.globals import Globals
2020
from ttboard.mode import RPMode
21+
from ttboard.pins.gpio_map import GPIOMapTT06
2122
from ttboard.pins.pins import Pins
2223
from ttboard.project_mux import Design
2324
from ttboard.config.user_config import UserConfig
@@ -139,6 +140,10 @@ def __init__(self,
139140
setattr(self, p, getattr(self.pins, p))
140141

141142
self.shuttle = Globals.project_mux(self.user_config.force_shuttle)
143+
if self.shuttle.run == 'tt07':
144+
pins_mode = self.pins.mode
145+
GPIOMapTT06.tt07_cb_fix = True
146+
self.pins.mode = pins_mode # force re-init of pins to apply new pin map
142147

143148
# config
144149
self.apply_configs = apply_user_config

src/ttboard/pins/gpio_map.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ class GPIOMapTT06(GPIOMapBase):
272272
UIO6 = 27
273273
UIO7 = 28
274274
RPIO29 = 29
275+
276+
# Enable a workaround for a PCB error in TT07 carrier board, which swapped the ctrl_sel_inc and ctrl_sel_nrst lines:
277+
tt07_cb_fix = False
275278

276279
@classmethod
277280
def project_clock(cls):
@@ -304,7 +307,7 @@ def always_outputs(cls):
304307
@classmethod
305308
def all(cls):
306309
retDict = cls.all_common()
307-
#retDict = GPIOMapBase.all(cls)
310+
308311
retDict.update({
309312
'nprojectrst': cls.PROJECT_nRST,
310313
'cinc': cls.CTRL_SEL_INC,
@@ -315,6 +318,10 @@ def all(cls):
315318
'uo_out2': cls.UO_OUT2,
316319
'uo_out3': cls.UO_OUT3
317320
})
321+
322+
if cls.tt07_cb_fix:
323+
retDict['cinc'], retDict['ncrst'] = retDict['ncrst'], retDict['cinc']
324+
318325
return retDict
319326

320327
GPIOMap = GPIOMapTT04

0 commit comments

Comments
 (0)