Skip to content

Commit

Permalink
update jupyter, fix bootloader_sam3u for fw updater
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-dewar committed Jan 16, 2023
1 parent db32b24 commit cea0a31
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion jupyter
17 changes: 12 additions & 5 deletions software/chipwhisperer/hardware/naeusb/bootloader_sam3u.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,16 @@

import serial # type: ignore
import time
from .serial import USART
from ...capture.api.cwcommon import ChipWhispererCommonInterface
from ...logging import *
# from .serial import USART
try:
from ...capture.api.cwcommon import ChipWhispererCommonInterface
except:
ChipWhispererCommonInterface = None # type: ignore

try:
from ...logging import *
except:
target_logger = logging # type: ignore

class XModem(object):

Expand Down Expand Up @@ -207,7 +214,7 @@ def write(self, ser, payload):
class Samba(object):

def con(self, port, usbmode=True):
if isinstance(port, ChipWhispererCommonInterface):
if ChipWhispererCommonInterface and isinstance(port, ChipWhispererCommonInterface): # type: ignore
ser = port._get_usart()
ser.init()
usbmode = False
Expand Down Expand Up @@ -877,7 +884,7 @@ def readFRR1(self):

if __name__ == "__main__":
# Example usage
target_logger.setLevel(level=logging.INFO)
# target_logger.setLevel(level=logging.INFO)
sam = Samba()
sam.con('com131')
sam.erase()
Expand Down

0 comments on commit cea0a31

Please sign in to comment.