I'm trying to get the I2C Master Bootloader Bridge Example working for the SAMD21 Xplained Pro Dev board and I'm having issues getting the code running. I currently have the following setup:
- SAMD21 Eval Board successfully working with Atmel Studio 7 and programmed with the I2C Master Bootloader Bridge Example
- I think the drivers are installed correctly. In device manager, I can see the Atmel section with the EDBG Data Gateway and the EDBG Virtual COM Port under Ports. However, Should I see the EDBG Debugger as well? I was looking at this I2C Document as a reference and on page 6 and 7 they list the EDBG Debugger under the Atmel section of the device manager.
- the EDBG is set as DGI and not MSG
- In any case, the eval board is able to be seen in the available tools and upgraded the EDBG to v3.25
- A second SAMD21 has the SAM I2C Slave Bootloader installed with the I2C lines(And GND) tied together
- A pair of 10k pullup resistors has been placed on the SDA and SCL pins
- Also have a logic analyzer tied to the SDA and SCL pins to look at the traffic
- Python 2.7 is installed on PC with the pyserial module.
- The project documentation states that we need to use a provided python script to communicate with the master over USB and transfer the binary app file.
- Through some trail and error I went with Python 2.7 instead of Python 3. I've found that Python 2.7 often has print statements without parens () whereas Python 3 will pull a error. Please let me know if this is not the case.
- I've had to guess what serial module they used and just went with the first serial module i found which happened to be pyserial
- A binary file has been created that starts at flash location 0x00002000
- This is just the starting project code of pressing SW1 and LED0 will turn on.
I've gotten to the part when I use "python bootloader.py -p COM3 -i led_toggle_flash.bin" command. When I use the command I get as far as "Transfering File..". Reading through the python script it seems like it got past opening the virtual port, sending the length of the file and then just hangs waiting for a response. When I try and debug this on the Atmel studio side, I set breakpoints and found that the COM port is never even detected as opened so it doesn't fall through to the file transfer part.
My only thought is if there another COM port that is supposed to exist for the DGI? I can only see one and it says its the EDBG Virtual COM port. Although when I connect to this COM port with TeraTerm, I can see the "Starting Application" prinf statements that are written into the code.
Any Suggestions would be great. (Also sorry for the wall of text)
Version information and helpful links:
- Atmel Studio 7(Version: 7.0.1931)
- ATF Version: 3.40.0
- Dev Board: SAMD21 Xplained Pro
- Python Version: V2.7.13
- pyserial v3.4
- SAMD21 Xplained Pro product page: http://www.microchip.com/developmenttools/ProductDetails/ATSAMD21-XPRO
- ATSAMD21J18 Product Page: https://www.microchip.com/wwwproducts/en/ATSAMD21J18
- I2C Master Bootloader Bridge product documentation: http://asf.atmel.com/docs/3.40.0/sam0.applications.i2c_master_bootloader_bridge.samd21_xpro/html/appdoc_main.html
- SAM I2C Slave Bootloader: http://asf.atmel.com/docs/3.40.0/sam0.applications.i2c_slave_bootloader.samd21_xplained_pro/html/appdoc_main.html
Thanks in Advanced!