Skip to content

Commit ba84c01

Browse files
author
Arbin Timilsina
committed
Erasing in cryo can sometimes take really long time- implimented a way to handle it
1 parent 3da2ded commit ba84c01

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

femb_python/configuration/configs/quadEpcsTester_v101.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def eraseFlash(self, epcsNum = 0):
103103
self.femb.write_reg(op_reg,0xC7)
104104

105105
#Erase bulk cycle time for EPCS64 is 160s max
106-
for t in range(480): #8 mins
106+
for t in range(160):
107107
status = self.readStatus(epcsNum)
108108
time.sleep(1)
109109
if(status == 0):
@@ -145,7 +145,7 @@ def programFlash(self, epcsNum = 0, pageNum = 0, inputData = None):
145145
self.femb.write_reg(op_reg,0x2)
146146

147147
#Write byte cycle time for EPCS64 is 5s max
148-
for t in range(15):
148+
for t in range(5):
149149
status = self.readStatus(epcsNum)
150150
time.sleep(1)
151151
if(status == 0):

femb_python/test_measurements/quadEpcsTester/testQuadEPCS.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def doTesting(self):
3131
return
3232

3333
#Loop through flashes and erase
34-
eraseTried = []
34+
eraseTried = [0]*self.nFlashes
35+
flashToSkip = [False]*self.nFlashes
3536
for iFlash in range(self.nFlashes):
3637
#Erase Flash
3738
self.femb_config.eraseFlash(iFlash)
@@ -45,8 +46,8 @@ def doTesting(self):
4546
eraseTried[iFlash] = iTries
4647

4748
if(iTries > 5):
48-
print("Flash %s has a problem. Please check and retry again!\nExiting!\n" %(iFlash))
49-
return
49+
print("Flash %s has a problem. Will skip this flash!\n" %(iFlash))
50+
flashToSkip[iFlash] = True
5051

5152
#Check a page (page 5 here) to make sure if things make sense; memory should be erased to 0xFFFFFFFF
5253
outputData = self.femb_config.readFlash(iFlash, 5)
@@ -57,10 +58,12 @@ def doTesting(self):
5758
print("\nDone erasing flashes! Begining the tests.\n")
5859

5960
#Loop over flashes and pages
60-
flashSuccess = [True]*self.nFlashes
6161
failedPages = [0]*self.nFlashes
6262
programTried = [[0 for iP in range(0, self.nPages)] for iF in range(0, self.nFlashes)]
6363
for iFlash in range(self.nFlashes):
64+
if flashToSkip[iFlash]:
65+
failedPages[iFlash] = 9999999
66+
continue
6467
for iPage in range(self.nPages):
6568
inputData = []
6669
for iNum in range(0, 64):
@@ -101,7 +104,6 @@ def doTesting(self):
101104
print("*" * 75)
102105
print("Writing to flash %s, page %s failed!" %(iFlash, iPage))
103106
print("*" * 75)
104-
flashSuccess[iFlash]= False
105107
failedPages[iFlash] += 1
106108
else:
107109
print("*" * 75)
@@ -117,10 +119,12 @@ def doTesting(self):
117119
for iFlash in range(self.nFlashes):
118120
print("\nNo. of tries to erase flash %s was %s" %(iFlash, eraseTried[iFlash]))
119121

122+
flashSuccess = [False]*self.nFlashes
120123
print("\nInfo on Write: ")
121124
print("Note: Will print no. of write tries if > 1 for a page")
122125
for iFlash in range(self.nFlashes):
123-
if(flashSuccess[iFlash]):
126+
if(failedPages[iFlash] == 0):
127+
flashSuccess[iFlash] = True
124128
print("\nFlash %s passed!!" %(iFlash))
125129
for iPage in range(self.nPages):
126130
if(programTried[iFlash][iPage] > 1):

0 commit comments

Comments
 (0)