Tools: fix decode_watchdog display of LR,FA and FICSR

This commit is contained in:
Peter Barker 2021-03-23 20:08:42 +11:00 committed by Peter Barker
parent 069b7142b7
commit 3035f8dea3
1 changed files with 5 additions and 1 deletions

View File

@ -247,6 +247,10 @@ class DecodeWatchDog(object):
continue continue
value = value.strip() value = value.strip()
# print("(%s)=(%s)" % (name, value)) # print("(%s)=(%s)" % (name, value))
if name in ["LR", "FICSR", "FA"]:
value = int(value, 10)
value = hex(value)
value = value[2:]
if name not in self.df_components: if name not in self.df_components:
raise KeyError(name) raise KeyError(name)
self.df_components[name](value).print_decoded() self.df_components[name](value).print_decoded()
@ -266,7 +270,7 @@ class DecodeWatchDog(object):
continue continue
value = m.group(i+1) value = m.group(i+1)
# convert some things from base10 to hex: # convert some things from base10 to hex:
if name in ["LR", "FICSR"]: if name in ["LR", "FICSR", "FA"]:
value = int(value, 10) value = int(value, 10)
value = hex(value) value = hex(value)
value = value[2:] value = value[2:]