Connect the SAM-BA with USB

Install SAM-BA software in your PC


[172677.700868] usb 2-1.4.4: new full-speed USB device number 31 using ehci-pci
[172677.792677] usb 2-1.4.4: not running at top speed; connect to a high speed hub
[172677.793418] usb 2-1.4.4: New USB device found, idVendor=03eb, idProduct=6124
[172677.793424] usb 2-1.4.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[172677.793897] cdc_acm 2-1.4.4:1.0: This device cannot do calls on its own. It is not a modem.
[172677.793924] cdc_acm 2-1.4.4:1.0: ttyACM0: USB ACM device
   
idVendor=03eb, idProduct=6124: from this message you can see it's Microchip board USB connection.


  • Start SAM-BA GUI application
  • Select the board: "at91sama9x35-ek" in the drop-down menu and choose the USB connection
samba_board_select_at91sam9x35ek.png

  • Click the "Connect" button, the SAM-BA main window show up:
samba_main_window_nand_at91sam9x35ek.png


Run script to flash the demo

  • Download the demo package for the board
  • Extract the demo package and launch the script to flash the demo:
    • For Microsoft Windows users: Launch the .bat file corresponding to the board that you are using
      This script will run SAM-BA with proper parameters
    • For Linux users: if the /dev/ttyACMx that appears is different from /dev/ttyACM0, edit the .sh file and modify /dev/ttyACMx device number
    • For Linux users: Launch the .sh file corresponding to the board that you are using.
      This script will runs SAM-BA with proper parameters
  • When the logfile.log appears (this will take a few minutes), check that
    ===== Done. =====
    is written at the end of the file
  • Remove the USB cable
  • Connect a serial link on DBGU and open the terminal emulator program as explained just above
  • Power cycle the board
  • Look the system booting on the LCD screen or through the serial line


Connect the USB to the board before launch SAM-BA

  • Remove power from the board
  • JP9 must be opened (BMS=1) to boot from the on-chip Boot ROM
Cogent module Embest module Ronetix module
open *NCS jumper open SW1 switch (not ON position) open J1 and J2 jumpers
which is (are) located on the CPU module to prevent access to serial flash and NAND flash
  • power up the board
  • check whether the board is found in your PC as a USB device
  • For Microsoft Windows users: verify that the USB connection is well established
    AT91 USB to Serial Converter should appear in Device Manager. If it shows a unknown device you need to download and install the driver: AT91SAM USB CDC driver
    AT91 USB to Serial Converter
  • For Linux users: check /dev/ttyACMx by monitoring the last lines of dmesg command:
    [172677.700868] usb 2-1.4.4: new full-speed USB device number 31 using ehci-pci
    [172677.792677] usb 2-1.4.4: not running at top speed; connect to a high speed hub
    [172677.793418] usb 2-1.4.4: New USB device found, idVendor=03eb, idProduct=6124
    [172677.793424] usb 2-1.4.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [172677.793897] cdc_acm 2-1.4.4:1.0: This device cannot do calls on its own. It is not a modem.
    [172677.793924] cdc_acm 2-1.4.4:1.0: ttyACM0: USB ACM device
       
    idVendor=03eb, idProduct=6124: from this message you can see it's Microchip board USB connection.
Cogent module Embest module Ronetix module
close *NCS jumper close SW1 switch (move to ON position) close J1 and J2 jumpers
which is (are) located on the CPU module to re-gain access to serial flash and NAND flash


Connect the USB to the board before launch SAM-BA

  • Make sure that power switch is on OFF (SW1 position toward the center of the board)
  • connect the power cable to the VCCIN 5V power supply jack
  • connect a USB micro-A cable to the board (USB-A J1)
  • Press and maintain PB3 DIS_BOOT button and switch on the board (SW1 position toward the edge of the board)
    The PB3 DIS_BOOT button prevents booting from Nand or serial Flash by disabling Flash Chip Selects
  • after having powered the board, you can release the PB3 DIS_BOOT button
  • check whether the board is found in your PC as a USB device:
    • For Microsoft Windows users: verify that the USB connection is well established
      AT91 USB to Serial Converter should appear in Device Manager. If it shows a unknown device you need to download and install the driver: AT91SAM USB CDC driver
      AT91 USB to Serial Converter
       
    • For Linux users: check /dev/ttyACMx by monitoring the last lines of dmesg command:
      [172677.700868] usb 2-1.4.4: new full-speed USB device number 31 using ehci-pci
      [172677.792677] usb 2-1.4.4: not running at top speed; connect to a high speed hub
      [172677.793418] usb 2-1.4.4: New USB device found, idVendor=03eb, idProduct=6124
      [172677.793424] usb 2-1.4.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
      [172677.793897] cdc_acm 2-1.4.4:1.0: This device cannot do calls on its own. It is not a modem.
      [172677.793924] cdc_acm 2-1.4.4:1.0: ttyACM0: USB ACM device
         
      idVendor=03eb, idProduct=6124: from this message you can see it's Microchip board USB connection.


Connect the USB to the board before launch SAM-BA

  • Short the JP7 (BOOT_DIS) to prevents booting from Nand or serial Flash by disabling Flash Chip Selects
  • Connect a USB micro-A cable to the board (J11 5V-USB-A) and powered the board.
  • Open the JP7 (BOOT_DIS) to enable booting from Nand or serial Flash by enabling Flash Chip Selects
  • check whether the board is found in your PC as a USB device:
    • For Microsoft Windows users:* verify that the USB connection is well established
      AT91 USB to Serial Converter should appear in Device Manager. If it shows a unknown device you need to download and install the driver: AT91SAM USB CDC driver
      AT91 USB to Serial Converter
       
    • For Linux users: check /dev/ttyACMx by monitoring the last lines of dmesg command:
      [172677.700868] usb 2-1.4.4: new full-speed USB device number 31 using ehci-pci
      [172677.792677] usb 2-1.4.4: not running at top speed; connect to a high speed hub
      [172677.793418] usb 2-1.4.4: New USB device found, idVendor=03eb, idProduct=6124
      [172677.793424] usb 2-1.4.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
      [172677.793897] cdc_acm 2-1.4.4:1.0: This device cannot do calls on its own. It is not a modem.
      [172677.793924] cdc_acm 2-1.4.4:1.0: ttyACM0: USB ACM device
         
      idVendor=03eb, idProduct=6124: from this message you can see it's Microchip board USB connection.


Connect the USB to the board before launch SAM-BA

  • Connect a USB cable to the board (J20)
  • JP9 must open so that (BMS == 1) to boot from on-chip Boot ROM
  • Press and maintain PB4 BS_BOOT button and power up the board
    PB4 CS_BOOT button prevents booting from Nand or serial Flash by disabling Flash Chip Selects
  • after having powered the board, you can release the PB4 BS_BOOT button
    • For Microsoft Windows users: verify that the USB connection is well established
      AT91 USB to Serial Converter should appear in Device Manager. If it shows a unknown device you need to download and install the driver: AT91SAM USB CDC driver
      AT91 USB to Serial Converter
       
    • For Linux users: check /dev/ttyACMx by monitoring the last lines of dmesg command:
      [172677.700868] usb 2-1.4.4: new full-speed USB device number 31 using ehci-pci
      [172677.792677] usb 2-1.4.4: not running at top speed; connect to a high speed hub
      [172677.793418] usb 2-1.4.4: New USB device found, idVendor=03eb, idProduct=6124
      [172677.793424] usb 2-1.4.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
      [172677.793897] cdc_acm 2-1.4.4:1.0: This device cannot do calls on its own. It is not a modem.
      [172677.793924] cdc_acm 2-1.4.4:1.0: ttyACM0: USB ACM device
         
      idVendor=03eb, idProduct=6124: from this message you can see it's Microchip board USB connection.


Connect the USB to the board before launch SAM-BA

  • Open JP5 to disable NAND Flash memory access
  • Press BP2 reset button to boot from on-chip Boot ROM
  • Close JP5 to enable NAND Flash memory access
    • For Microsoft Windows users: verify that the USB connection is well established
      AT91 USB to Serial Converter should appear in Device Manager. If it shows a unknown device you need to download and install the driver: AT91SAM USB CDC driver
      AT91 USB to Serial Converter
       
    • For Linux users: check /dev/ttyACMx by monitoring the last lines of dmesg command:
      [172677.700868] usb 2-1.4.4: new full-speed USB device number 31 using ehci-pci
      [172677.792677] usb 2-1.4.4: not running at top speed; connect to a high speed hub
      [172677.793418] usb 2-1.4.4: New USB device found, idVendor=03eb, idProduct=6124
      [172677.793424] usb 2-1.4.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
      [172677.793897] cdc_acm 2-1.4.4:1.0: This device cannot do calls on its own. It is not a modem.
      [172677.793924] cdc_acm 2-1.4.4:1.0: ttyACM0: USB ACM device
         
      idVendor=03eb, idProduct=6124: from this message you can see it's Microchip board USB connection.


Program NAND flash binary

NAND Flash demo - Memory map

demo_nandflash_map_lnx4sam5x.png

Program AT91Bootstrap binary


  • Start SAM-BA GUI application
  • Select the board: "at91sama5d3x-ek" in the drop-down menu and choose the USB connection.
samba_board_select_sama5d3xek.png

  • Click the "Connect" button, the SAM-BA main window show up:
samba_main_window_nand_sama5d3xek.png


  1. Choose the NandFlash tab in the SAM-BA GUI interface
  2. Initialize the NandFlash by choosing the Enable NandFlash action in the Scripts rolling menu, then press Execute button
  3. Enable the PMECC by choosing the Enable OS PMECC parameters action, then press Execute button
samba_scripts_menu.png


  1. To see the detail of PMECC parameters, you can choose the PMECC configuration action, then press Execute button.
    scripts_menu_pmecc_configure.png
  2. For SAMA5D3x-EK and SAMA5D3 Xplained board, since the default PMECC error correction bits is selected 4bits, so Number of ECC bits required should be selected to 4, and Ecc offset should be set to 36 in the below.
    ecc_config_4bit.png


  1. To see the detail of PMECC parameters, you can choose the PMECC configuration action, then press Execute button.
    scripts_menu_pmecc_configure.png
  2. For SAMA5D3x-EK and SAMA5D3 Xplained board, since the default PMECC error correction bits is selected 4bits, so Number of ECC bits required should be selected to 4, and Ecc offset should be set to 36 in the below.
    ecc_config_4bit.png


  • Start SAM-BA GUI application
  • Select the board: "at91sama5d4x-ek" in the drop-down menu and choose the USB connection
samba_board_select_sama5d4ek.png

  • Click the "Connect" button, the SAM-BA main window show up:
samba_main_window_nand_sama5d4ek.png


  1. To see the detail of PMECC parameters, you can choose the PMECC configuration action, then press Execute button.
    scripts_menu_pmecc_configure.png
  2. For SAMA5D4EK or SAMA5D4 Xplained board, since the default PMECC error correction bits is selected 8bits, so Number of ECC bits required should be selected to 8, and Ecc offset should be set to 120 in the below.
    ecc_config_8bit.png


  1. To see the detail of PMECC parameters, you can choose the PMECC configuration action, then press Execute button.
    scripts_menu_pmecc_configure.png
  2. For SAMA5D4EK or SAMA5D4 Xplained board, since the default PMECC error correction bits is selected 8bits, so Number of ECC bits required should be selected to 8, and Ecc offset should be set to 120 in the below.
    ecc_config_8bit.png


Configure NAND ECC

Using OS default PMECC parameters

  1. Choose the NandFlash tab in the SAM-BA GUI interface
  2. Initialize the NandFlash by choosing the Enable NandFlash action in the Scripts rolling menu, then press Execute button
  3. Enable the PMECC by choosing the Enable OS PMECC parameters action, then press Execute button
samba_scripts_menu.png

Configure PMECC parameters (optional)


  • Start SAM-BA GUI application
  • Select the board: "at91sama5d3x-ek" in the drop-down menu and choose the USB connection.
samba_board_select_sama5d3xek.png

  • Click the "Connect" button, the SAM-BA main window show up:
samba_main_window_nand_sama5d3xek.png


  • Start SAM-BA GUI application
  • Select the board: "at91sama5d4x-ek" in the drop-down menu and choose the USB connection
samba_board_select_sama5d4ek.png

  • Click the "Connect" button, the SAM-BA main window show up:
samba_main_window_nand_sama5d4ek.png


Programming components into NAND

Program AT91Bootstrap binary

  • Choose Send Boot File action, then press Execute button to select the at91bootstrap binary file and to program the binary to the NandFlash

scripts_menu_send_boot_file.png

Program U-Boot binary

  1. Modify the Address to 0x40000
  2. Choose Send File Name open file dialog and select the U-Boot binary file and to program the binary to the NandFlash
  3. Click Send File button to program the binary to the NandFlash in address 0x40000.
samba_send_file_nand.png

Program Linux dtb file

  1. Modify the Address to 0x180000
  2. Choose Send File Name open file dialog and select the dtb binary file and to program the binary to the NandFlash
  3. Click Send File button to program the binary to the NandFlash in address 0x180000.
samba_send_file_nand.png

Program Linux Kernel file

  1. Modify the Address to 0x200000
  2. Choose Send File Name open file dialog and select the Linux kernel binary file and to program the binary to the NandFlash
  3. Click Send File button to program the binary to the NandFlash in address 0x200000.
samba_send_file_nand.png

Program rootfs UBI file

Make sure you erased the nand area (0x800000~END of nand) before you program it.

  • Enable the trimffs option by choosing the PMECC configuration action, then press Execute button.
    scripts_menu_pmecc_configure.png
  • Then select Trimffs option and click "OK" button.
    ecc_config_4bit_trimffs.png

  1. Modify the Address to 0x800000
  2. Choose Send File Name open file dialog and select the UBI filesystem binary file and to program the binary to the NandFlash
  3. Click Send File button to program the binary to the NandFlash in address 0x800000.
samba_send_file_nand.png

Make sure you erased the nand area (0x800000~END of nand) before you program it.

  • Enable the trimffs option by choosing the PMECC configuration action, then press Execute button.
    scripts_menu_pmecc_configure.png
  • Then select Trimffs option and click "OK" button.
    ecc_config_4bit_trimffs.png

  1. Modify the Address to 0x800000
  2. Choose Send File Name open file dialog and select the UBI filesystem binary file and to program the binary to the NandFlash
  3. Click Send File button to program the binary to the NandFlash in address 0x800000.
samba_send_file_nand.png

Make sure you erased the nand area (0x800000~END of nand) before you program it.

  1. Modify the Address to 0x800000
  2. Choose Send File Name open file dialog and select the UBI filesystem binary file and to program the binary to the NandFlash
  3. Click Send File button to program the binary to the NandFlash in address 0x800000
samba_send_file_nand.png

Make sure you erased the nand area (0x800000~END of nand) before you program it.

  1. Modify the Address to 0x800000
  2. Choose Send File Name open file dialog and select the UBI filesystem binary file and to program the binary to the NandFlash
  3. Click Send File button to program the binary to the NandFlash in address 0x800000
samba_send_file_nand.png

Make sure you erased the nand area (0x800000~END of nand) before you program it.

  1. Modify the Address to 0x800000
  2. Choose Send File Name open file dialog and select the UBI filesystem binary file and to program the binary to the NandFlash
  3. Click Send File button to program the binary to the NandFlash in address 0x800000
samba_send_file_nand.png

Make sure you erased the nand area (0x800000~END of nand) before you program it.

  1. Modify the Address to 0x800000
  2. Choose Send File Name open file dialog and select the UBI filesystem binary file and to program the binary to the NandFlash
  3. Click Send File button to program the binary to the NandFlash in address 0x800000
samba_send_file_nand.png

I Attachment Action Size Date WhoSorted descending Comment
PNGpng demo_nandflash_map_lnx4sam.png manage 19.6 K 2015-05-19 - 04:48 UnknownUser  
PNGpng demo_nandflash_map_lnx4sam6x.png manage 8.9 K 2018-11-05 - 17:24 UnknownUser  
PNGpng devman_AT91_USB_SAMBA-CDC.png manage 20.4 K 2015-05-19 - 04:48 UnknownUser  
PNGpng ecc_config_4bit.png manage 24.6 K 2015-05-19 - 04:49 UnknownUser  
PNGpng ecc_config_4bit_trimffs.png manage 18.3 K 2015-05-19 - 04:49 UnknownUser  
PNGpng ecc_config_8bit.png manage 24.8 K 2015-05-19 - 04:49 UnknownUser  
PNGpng samba_board_select_at91sam9x35ek.png manage 13.4 K 2016-09-07 - 15:07 UnknownUser at91sam9x35ek samba board select
PNGpng samba_board_select_sama5d3xek.png manage 16.9 K 2015-05-19 - 04:49 UnknownUser  
PNGpng samba_board_select_sama5d4ek.png manage 16.9 K 2015-05-19 - 04:50 UnknownUser  
PNGpng samba_main_window_nand_at91sam9x35ek.png manage 53.8 K 2016-09-07 - 15:12 UnknownUser at91sam9x35ek samba main window
PNGpng samba_main_window_nand_sama5d3xek.png manage 68.4 K 2015-05-19 - 04:51 UnknownUser  
PNGpng samba_main_window_nand_sama5d4ek.png manage 64.2 K 2015-05-19 - 04:52 UnknownUser  
PNGpng samba_scripts_menu.png manage 37.7 K 2015-05-19 - 04:52 UnknownUser  
PNGpng samba_send_file_nand.png manage 19.4 K 2015-05-19 - 04:52 UnknownUser  
PNGpng scripts_menu_pmecc_configure.png manage 18.8 K 2015-05-19 - 04:53 UnknownUser  
PNGpng scripts_menu_send_boot_file.png manage 18.9 K 2015-05-19 - 04:53 UnknownUser