File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1818import ttboard .util .time as time
1919from ttboard .globals import Globals
2020from ttboard .mode import RPMode
21+ from ttboard .pins .gpio_map import GPIOMapTT06
2122from ttboard .pins .pins import Pins
2223from ttboard .project_mux import Design
2324from 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
Original file line number Diff line number Diff 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
320327GPIOMap = GPIOMapTT04
You can’t perform that action at this time.
0 commit comments