User Tools

Site Tools


documentation:electronics:samdisp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
documentation:electronics:samdisp [2021/02/15 15:51]
daniele
documentation:electronics:samdisp [2021/02/15 16:00] (current)
daniele
Line 1: Line 1:
-===== The board =====+===== SAMD ISP =====
  
 Based on the [[http://ww1.microchip.com/downloads/en/devicedoc/atmel-42363-sam-d11_datasheet.pdf|ATASAMD11C14]], the SAMD ISP is a small programmer board that allows all the microntrollers from the SAMD family to be programmed via Serial Debug Interface, or SWD. SWD is a 2 pin alternative to the JTAG interface, using the same protocol under the hood. SWD is specific to ARM microcontrollers that implement a standard wire bi-directional communication. Based on the [[http://ww1.microchip.com/downloads/en/devicedoc/atmel-42363-sam-d11_datasheet.pdf|ATASAMD11C14]], the SAMD ISP is a small programmer board that allows all the microntrollers from the SAMD family to be programmed via Serial Debug Interface, or SWD. SWD is a 2 pin alternative to the JTAG interface, using the same protocol under the hood. SWD is specific to ARM microcontrollers that implement a standard wire bi-directional communication.
Line 25: Line 25:
   * **USB Mini/Micro cable(s)** A USB micro cable is needed to power/interface the ATMEL-ICE and a USB mini cable is needed for SAMD ISP.   * **USB Mini/Micro cable(s)** A USB micro cable is needed to power/interface the ATMEL-ICE and a USB mini cable is needed for SAMD ISP.
   * **[[https://www.sparkfun.com/products/8535|5X2 Ribbon cable and connectors 0.1" pitch]]**. The ribbon cable is useful as programming cable, both from ATMEL-ICE (using the adapter board), or from the SAMD ISP.   * **[[https://www.sparkfun.com/products/8535|5X2 Ribbon cable and connectors 0.1" pitch]]**. The ribbon cable is useful as programming cable, both from ATMEL-ICE (using the adapter board), or from the SAMD ISP.
-  * **[[uploads:6f85a1408f478af49985db5e1c58bb2f:converter_board|Converter Board]]** Small board-hack that allows the ATMEL-ICE to connect with higher picther SMD headers.+  * **[[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/6f85a1408f478af49985db5e1c58bb2f/converter_board.zip|Converter Board]]** Small board-hack that allows the ATMEL-ICE to connect with higher picther SMD headers.
  
 An important note is, it is always needed to power the devices separately during programming. As power source the USB port is recommended. An important note is, it is always needed to power the devices separately during programming. As power source the USB port is recommended.
Line 35: Line 35:
   * **[[https://www.arduino.cc/en/main/software|Arduino IDE]]**. Arudino programming environment, can be used to program the SAMD chips as well if the proper core is installed.   * **[[https://www.arduino.cc/en/main/software|Arduino IDE]]**. Arudino programming environment, can be used to program the SAMD chips as well if the proper core is installed.
   * **[[https://github.com/mattairtech/ArduinoCore-samd|Mattairtech ArduinoCore-samd]]**. Arduino core to support the SAMD microcontroller. It is required to be able to use the Arduino IDE with the SAMD microcontrollers.   * **[[https://github.com/mattairtech/ArduinoCore-samd|Mattairtech ArduinoCore-samd]]**. Arduino core to support the SAMD microcontroller. It is required to be able to use the Arduino IDE with the SAMD microcontrollers.
-  * **[[uploads:b605e1bbaf9e3c5106394d36c4c5df92:free_dap_d11c_mini|SAMD ISP firmware]]**. This firmware for the SAMD ISP makes it working as an ISP programmer.+  * **[[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/b605e1bbaf9e3c5106394d36c4c5df92/free_dap_d11c_mini.bin|SAMD ISP firmware]]**. This firmware for the SAMD ISP makes it working as an ISP programmer.
  
 === ATMEL-ICE === === ATMEL-ICE ===
Line 49: Line 49:
   * Install the [[https://github.com/mattairtech/ArduinoCore-samd|Mattairtech ArduinoCore-samd]]   * Install the [[https://github.com/mattairtech/ArduinoCore-samd|Mattairtech ArduinoCore-samd]]
  
-Once the drivers are installed you can connect the board you want to program. Because of the small picth of the ATMEL-ICE connectors, you may need to use the [[uploads:6f85a1408f478af49985db5e1c58bb2f:converter_board|converter board]]. The following pictures shows how to connect the ATMEL-ICE to the SAMD ISP. If the green LED is on, then ATMEL-ICE successfully detects the connection with the chip that will be programmed.+Once the drivers are installed you can connect the board you want to program. Because of the small picth of the ATMEL-ICE connectors, you may need to use the [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/6f85a1408f478af49985db5e1c58bb2f/converter_board.zip|converter board]]. The following pictures shows how to connect the ATMEL-ICE to the SAMD ISP. If the green LED is on, then ATMEL-ICE successfully detects the connection with the chip that will be programmed.
  
 {{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/00cd69403d6ade8c2f52365a6d4414c0/ice_isp.jpg|ice_isp}}When using the Arduino IDE to upload the bootloader or the code, the following options are selected: {{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/00cd69403d6ade8c2f52365a6d4414c0/ice_isp.jpg|ice_isp}}When using the Arduino IDE to upload the bootloader or the code, the following options are selected:
Line 79: Line 79:
 Following is an image about how to connect the SAMD ISP with a fresh one. Following is an image about how to connect the SAMD ISP with a fresh one.
  
-{{uploads:ce961839d4f429121158655be9aece2d:SAMD_ISP.jpg|SAMD_ISP}}Example with the [[uploads:b605e1bbaf9e3c5106394d36c4c5df92:free_dap_d11c_mini|SAMD ISP firmware]]:+{{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/ce961839d4f429121158655be9aece2d/SAMD_ISP.jpg|SAMD_ISP}}Example with the [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/b605e1bbaf9e3c5106394d36c4c5df92/free_dap_d11c_mini.bin|SAMD ISP firmware]]:
  
 ''edbg -b -t samd11 -pv -f free_dap_d11c_mini.bin'' ''edbg -b -t samd11 -pv -f free_dap_d11c_mini.bin''
  
-{{uploads:a64237ad63190813971d1cda38355cf7:edbg_windows.JPG|edbg_windows}}Type ''edbg -h'' to have the explanation about the different parameters. Notable ones are the ''-t'' target and the ''-f'' that indicates the file you want to upload.+{{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/a64237ad63190813971d1cda38355cf7/edbg_windows.JPG|edbg_windows}}Type ''edbg -h'' to have the explanation about the different parameters. Notable ones are the ''-t'' target and the ''-f'' that indicates the file you want to upload.
  
-{{uploads:4b7bb46ae72d724aa01189699cc79a1b:edbg_targets.JPG|edbg_targets}}Once the SAMD ISP firmware has been uploaded, the programmer will be recognized.+{{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/4b7bb46ae72d724aa01189699cc79a1b/edbg_targets.JPG|edbg_targets}}Once the SAMD ISP firmware has been uploaded, the programmer will be recognized.
  
-{{uploads:5e56485183d5492337b379dc9bbda40f:SAMD_ISP_detected_2.JPG|SAMD_ISP_detected_2}}{{uploads:2ba1a9e92ac3205de907eb85c32c47b4:SAMD_ISP_detected_1.JPG|SAMD_ISP_detected_1}}In case more than one programmer is connected, it is needed to specify the serial number of the programmer that will be used to upload the code. This can be done by using the ''-s'' parameter.+{{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/5e56485183d5492337b379dc9bbda40f/SAMD_ISP_detected_2.JPG|SAMD_ISP_detected_2}}{{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/2ba1a9e92ac3205de907eb85c32c47b4/SAMD_ISP_detected_1.JPG|SAMD_ISP_detected_1}}In case more than one programmer is connected, it is needed to specify the serial number of the programmer that will be used to upload the code. This can be done by using the ''-s'' parameter.
  
-{{uploads:c669fb25a0b60b9fb3e5c7f083d080a1:programmer_selection.JPG|programmer_selection}}To upload a code that has been compiled by the Arduino IDE, it is possible to manually copy the compiled bin from the temp folder the IDE is using to store the builds. To find the path is sufficient to enable the verbose output in the Arduino IDE preferences, and then find the path from the compilation logs.+{{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/c669fb25a0b60b9fb3e5c7f083d080a1/programmer_selection.JPG|programmer_selection}}To upload a code that has been compiled by the Arduino IDE, it is possible to manually copy the compiled bin from the temp folder the IDE is using to store the builds. To find the path is sufficient to enable the verbose output in the Arduino IDE preferences, and then find the path from the compilation logs.
  
-{{uploads:32d20ff72dcca07e62df83f29f173d77:verbose_arduino_ide.JPG|verbose_arduino_ide}}{{uploads:a69c8628c8bc8f47ef550af7da25a9cd:temp_build.JPG|temp_build}}{{uploads:79d123f48fc976fef5c5da03bd797e6f:bin.JPG|bin}}=== Directly from USB ===+{{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/32d20ff72dcca07e62df83f29f173d77/verbose_arduino_ide.JPG|verbose_arduino_ide}}{{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/a69c8628c8bc8f47ef550af7da25a9cd/temp_build.JPG|temp_build}}{{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/79d123f48fc976fef5c5da03bd797e6f/bin.JPG|bin}}=== Directly from USB ===
  
 Depending on which bootloader you have installed into the SAMD ISP, or other SAM microcontrollers, it is possible to directly upload the code by using the USB connection. The recommended one for uploading code via USB is the MattairTech "Generic D11C14A", found here: [[https://github.com/mattairtech/ArduinoCore-samd|Mattairtech ArduinoCore-samd]]. Depending on which bootloader you have installed into the SAMD ISP, or other SAM microcontrollers, it is possible to directly upload the code by using the USB connection. The recommended one for uploading code via USB is the MattairTech "Generic D11C14A", found here: [[https://github.com/mattairtech/ArduinoCore-samd|Mattairtech ArduinoCore-samd]].
  
-{{uploads:464a056c5d499c8e5b4b4d84d55a36c5:MattairBootloader.jpg|MattairBootloader}}Once the proper bootloader is installed, the board will be recognized by the Arduino IDE, and a new serial port will be available.+{{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/464a056c5d499c8e5b4b4d84d55a36c5/MattairBootloader.jpg|MattairBootloader}}Once the proper bootloader is installed, the board will be recognized by the Arduino IDE, and a new serial port will be available.
  
-{{uploads:6a72f76b9355e4f14ce4f2057a2356c0:MattairTech_bootloader.jpg|MattairTech_bootloader}}At this point to upload the code, you just need to push the upload button of the Arduino IDE.+{{https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/6a72f76b9355e4f14ce4f2057a2356c0/MattairTech_bootloader.jpg|MattairTech_bootloader}}At this point to upload the code, you just need to push the upload button of the Arduino IDE.
  
 ===== Downloads ===== ===== Downloads =====
Line 103: Line 103:
 == SAMD ISP Files == == SAMD ISP Files ==
  
-  * [[uploads:951dd7b4fcacc99c6aed488bedb31b18:ISP_ATSAMD11C14|Eagle Schematic]] +  * [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/951dd7b4fcacc99c6aed488bedb31b18/ISP_ATSAMD11C14.sch|Eagle Schematic]] 
-  * [[uploads:cb09e03f6c63f0b8424dfeb200fefda3:ISP_ATSAMD11C14|Eagle Board]] +  * [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/cb09e03f6c63f0b8424dfeb200fefda3/ISP_ATSAMD11C14.brd|Eagle Board]] 
-  * [[uploads:5549cde082653b9a912eca2d41d74b40:traces|Traces PNG]] +  * [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/5549cde082653b9a912eca2d41d74b40/traces.png|Traces PNG]] 
-  * [[uploads:1fcbbefd6ad8fe5b00945f5244558d25:cutout|Cutout PNG]] +  * [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/1fcbbefd6ad8fe5b00945f5244558d25/cutout.png|Cutout PNG]] 
-  * [[uploads:f004605eeb2b416b544b7b1c7cad7b20:ISP_ATSAMD11C14|SAMD ISP Eagle Library]]+  * [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/f004605eeb2b416b544b7b1c7cad7b20/ISP_ATSAMD11C14.lbr|SAMD ISP Eagle Library]]
  
 == Software == == Software ==
Line 113: Line 113:
 EDBG v. B74: EDBG v. B74:
  
-  * [[uploads:d7c86196954d785fc96b83a26568916a:edbg_linuxc|EDBG Linux C]] +  * [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/d7c86196954d785fc96b83a26568916a/edbg_linuxc.rar|EDBG Linux C]] 
-  * [[uploads:1efbf55f0ac8252fdd8480ba73fa6ded:edbg_linuxgcc|EDBG Linux GCC]] +  * [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/1efbf55f0ac8252fdd8480ba73fa6ded/edbg_linuxgcc.rar|EDBG Linux GCC]] 
-  * [[uploads:d44cc86232397aacd171b11d50b5f34b:edbg_macc|EDBG Mac C]] +  * [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/d44cc86232397aacd171b11d50b5f34b/edbg_macc.rar|EDBG Mac C]] 
-  * [[uploads:1dc64823fe09c672c7e5c16e2e0b65d6:edgb_macgcc|EDBG Mac GCC]] +  * [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/1dc64823fe09c672c7e5c16e2e0b65d6/edgb_macgcc.rar|EDBG Mac GCC]] 
-  * [[uploads:89359d786315fdb478feb2d30118896d:edbg_win|EDBG Windows]]+  * [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/89359d786315fdb478feb2d30118896d/edbg_win.rar|EDBG Windows]]
  
 SAMD ISP firmware: SAMD ISP firmware:
  
-  * [[uploads:b605e1bbaf9e3c5106394d36c4c5df92:free_dap_d11c_mini|free_dap_d11c_mini.bin]]+  * [[https://gitlab.hsrw.eu/ferdinand.meier/fablab/-/wikis/uploads/b605e1bbaf9e3c5106394d36c4c5df92/free_dap_d11c_mini.bin|free_dap_d11c_mini.bin]]
  
 ===== Useful Links ===== ===== Useful Links =====
  
 [[http://ww1.microchip.com/downloads/en/devicedoc/atmel-42363-sam-d11_datasheet.pdf|SAMD11 datasheet]]\\ [[http://academy.cba.mit.edu/classes/embedded_programming/index.html#programmers|Fab Academy Programmers]]\\ [[https://github.com/ataradov/edbg|EDBG]]\\ [[http://www.ti.com/lit/ds/symlink/lm3480.pdf|LM3480IM3-3.3]]\\ [[https://www.arduino.cc/en/main/software|Arduino IDE]]\\ [[https://github.com/mattairtech/ArduinoCore-samd|Mattairtech ArduinoCore-samd]]\\ [[https://www.microchip.com/mplab/avr-support/atmel-studio-7|Atmel Studio 7]]\\ [[https://www.digikey.com/product-detail/en/ATATMEL-ICE-BASIC/ATATMEL-ICE-BASIC-ND|Atmel ICE]]\\ [[http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-ICE_UserGuide.pdf|Atmel ICE User Guide]]\\ [[https://github.com/ataradov/free-dap|Free-DAP]] [[http://ww1.microchip.com/downloads/en/devicedoc/atmel-42363-sam-d11_datasheet.pdf|SAMD11 datasheet]]\\ [[http://academy.cba.mit.edu/classes/embedded_programming/index.html#programmers|Fab Academy Programmers]]\\ [[https://github.com/ataradov/edbg|EDBG]]\\ [[http://www.ti.com/lit/ds/symlink/lm3480.pdf|LM3480IM3-3.3]]\\ [[https://www.arduino.cc/en/main/software|Arduino IDE]]\\ [[https://github.com/mattairtech/ArduinoCore-samd|Mattairtech ArduinoCore-samd]]\\ [[https://www.microchip.com/mplab/avr-support/atmel-studio-7|Atmel Studio 7]]\\ [[https://www.digikey.com/product-detail/en/ATATMEL-ICE-BASIC/ATATMEL-ICE-BASIC-ND|Atmel ICE]]\\ [[http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-ICE_UserGuide.pdf|Atmel ICE User Guide]]\\ [[https://github.com/ataradov/free-dap|Free-DAP]]
documentation/electronics/samdisp.1613404289.txt.gz · Last modified: 2021/02/15 15:51 by daniele