FaradayRF / FaradayRF-Hardware

Faraday hardware design files
https://www.faradayrf.com
Other
40 stars 7 forks source link

Test USB Bootloader FTDI Functionality #25

Closed kb1lqd closed 7 years ago

kb1lqd commented 7 years ago

Verify that REV C boards which contain the FTDI traces as tested with flywire correctly load bootloader of TI and program board.

kb1lqd commented 7 years ago

I ran the as last saved (with COM port updated) BSL uploader I wrote and it worked almost:

image

I'm using the unit that I just took off the external 18pF LFXTAL1 load capacitors (REV B1 SN#3) but that shouldn't affect this. It should use the REFOSC...

Hmmm... It looks like the unit is now PORT 6! I did update the programming on the FTDI chip prior to trying the BSL to make sure the CBUS GPIO's were configured correctly...

image

Trying COM PORT 6

image

It's really really slow even at 115200 baud and still failed checksum. Is my checksum calculation ok?

image

image

Partial Summary

kb1lqd commented 7 years ago

I tried quickly again with the other REV B1 on COM 3 and the unit is still slow:

image

Checking Schematic REV B1

REV A used fly-wired connections, this is REV B. I bet I'm an idiot and didn't check the configuration of BSL entry CBUS GPIO's...

image

Datasheet for SSOP package used on REV A: image

image

Looks like I'm using pins 7 (RST) and 16 (TEST) which are CBUS 2 and 3 respectively.

My old code used 0x04 and 0x08 bitmasks which indicate the the MSB's are CBUS 2 and 3. image

REV B1 moved to:

RST = CBUS 0 (0x01) TEST = CBUS 1(0x02)

Success!

Due to the CBUS pin change the bitmask for CBUS in the FTDI driver needed updating.

RST = CBUS 0 (Bitmask = 0x01) TEST = CBUS 1(Bitmask = 0x02)

class FtdiD2xxCbusControlObject(object):
    def __init__(self):
        self.BITMASK_IO_OUTPUTS = 0xF0
        self.BITMASK_IO_OUTPUTS_RESET = 0x40
        self.BITMASK_IO_INPUTS = 0x00
        self.BITMASK_RST = 0x01
        self.BITMASK_TEST = 0x02
        self.DELAY_TIME = 1
        self.handle = ''
        self.ftd2xxDll = ''

image

kb1lqd commented 7 years ago

I loaded an old code on with the BSL to REV B1 and to my inspection it looks correct. I can play with LED's to absolutely verify but I feel confident due to the above debugging and known good scripts verifying the matching checksum's.

Closing.