Serious Issues Using SAM-BA

All design tool related questions: compiler, assembler, linker. Embedded programming questions: assembler, C code.

Moderator: nferre

PeterT
Posts: 17
Joined: Tue Jun 21, 2016 12:03 am

Serious Issues Using SAM-BA

Thu Oct 06, 2016 10:31 pm

I'm using linux on my host machine and trying to use SAM-BA with the SAMA5D2 XPLAINED (rev B). Initially, any command I tried to failed with

Code: Select all

"Opening serial port 'ttyACM0'
Error: Could not switch monitor on port 'ttyACM0' to binary mode
Connection closed.
I finally used a terminal program (C-Kermit) to manually connect to the port (had to set the baud rate to 57600 instead of 115200 as stated in the datasheet) and use the N# command. Then my commands at least got farther.

No any time I try to use an applet, I get the following

Code: Select all

sam-ba --port serial:ttyACM0:57600 --board sama5d2-xplained --applet bootconfig
Connection opened.
<path>/tools/sam-ba_3.1.4/qml/SAMBA/Applet.qml:96: Error: Could not initialize applet (status: undefined)
Connection closed.
It's the same for any applet. This has been ridiculously frustrating. Please, someone help me out with this.
elyask
Posts: 2
Joined: Mon Jul 01, 2019 6:41 am

Re: Serious Issues Using SAM-BA

Tue Jul 02, 2019 6:21 am

Hi Peter,

I am having the same issue. I would like to know if you have solved your problem. If yes how?

Thanks
Elyas
uaraz
Posts: 3
Joined: Tue Oct 01, 2019 6:04 am

Re: Serious Issues Using SAM-BA

Tue Oct 01, 2019 6:13 am

Hi all,

I'm having the same problem as OP. Actually it was working the first time, but it would not work at all. Seems like microchip is not helping.
nferre
Site Admin
Posts: 207
Joined: Wed Feb 14, 2007 11:17 am

Re: Serious Issues Using SAM-BA

Tue Oct 01, 2019 2:47 pm

Hi,

You may access the chip with serial line instead of USB gadget. Using only one USB-microUSB cable will help you to make sure and get used to the way to use SAM-BA tool.
uaraz
Posts: 3
Joined: Tue Oct 01, 2019 6:04 am

Re: Serious Issues Using SAM-BA

Thu Oct 03, 2019 6:16 am

Hi nferre,

Do you mind to elaborate more?

I tried 2 methods:
1. USB-UART adapter connected to target board uart debug port, and run "demo_linux_serialflash_ttyUSB0.sh":
-> Error: Could not switch monitor on port 'ttyUSB0' to binary mode

2. micro usb cable connected to target board and run "demo_linux_serialflash.sh":
-> Error: could not initialize applet (status: undefined)

appreciate if someone could help.
blue_z
Location: USA
Posts: 1978
Joined: Thu Apr 19, 2007 10:15 pm

Re: Serious Issues Using SAM-BA

Fri Oct 04, 2019 10:56 pm

uaraz wrote: Do you mind to elaborate more?
You could do the same.
What version of the SoC do you have?
What board connections and jumper settings are you using?
Just one line of the error message provides no context. Were there other messages displayed?


The SAM-BA utility is guaranteed to fail if the SAM target board is not already executing the SAM-BA Monitor from ROM.
You can confirm that the board is executing the SAM-BA Monitor by using on the PC a terminal emulator program for the serial connection, e.g. ttyACM0 or ttyUSB0.
Type the "V#" command to retrieve the version string.
If there's no response, then the SAM board is not ready on that interface for the SAM-BA utility.
IOW seeing the "RomBOOT" text in response to a reset is not sufficient confirmation for a SAM-BA Monitor connection.

uaraz wrote: I tried 2 methods:
1. USB-UART adapter connected to target board uart debug port,
A SAM-BA connection using the J1 DBGU connector requires proper connections.
Of course JP2 (DEBUG_DIS) has to be left open.
You can power the board in one of three ways for a functional SAM-BA connection on DBGU:
  • A 5V power supply to either J14 (EDBG-USB) or J23 (A5-USB-A).
  • A power-only USB cable from a USB host (e.g. a PC) to either J14 (EDBG-USB) or J23 (A5-USB-A).
  • A standard USB connection from a USB host (e.g. a PC) to J14 (EDBG_USB). JP1 (EDBG_DIS) should be shorted.
When the board is powered properly for SAM-BA, then there is no need for kluged scripts as your demo_linux_serialflash_ttyUSB0.sh.

Regards
uaraz
Posts: 3
Joined: Tue Oct 01, 2019 6:04 am

Re: Serious Issues Using SAM-BA

Wed Oct 09, 2019 6:21 am

Hi blue_z,

I am currently using Sama5d2 Xplained Ultra board on windows host.

Here is what I did:
1. Short JP9 (BOOT_DIS)
2. Connect usb cable to J23 port
3. Bossa Program Port (COM4) detected in device manager
4. Managed to get version when 'V#' is sent: "v1.2 Dec 1 2015 09:20:36"
5. run "demo_linux_serialflash.sh" from the sample yocto image.
6. The following error message appear:
Opening serial port 'COM4'
Connection opened.
-I- === Initialize serialflash access ===
C:/Users/yopok/Downloads/sam-ba_3.2.3-win32/sam-ba_3.2.3/qml/SAMBA/Applet.qml:232: Error: Could not initialize applet (status: 1)
Connection closed.

I tried the same method using a ubuntu (virtual box) but still getting the same error.

I then modified "demo_linux_serialflash_usb.qml" to only flash the eMMC memory. This time I am able to flash the filesystem to eMMC and no error message. It seems that only the serial flashing part (u-boot and kernel image) will fail.
nferre
Site Admin
Posts: 207
Joined: Wed Feb 14, 2007 11:17 am

Re: Serious Issues Using SAM-BA

Wed Oct 09, 2019 9:24 am

Hi,

Maybe it's because BOOT_DIS is still positioned when you run the script. If it's the case, the SAM-BA applet cannot position the CS and access the serial flash...

Regards,
Nicolas

Return to “Development Tools”

Who is online

Users browsing this forum: No registered users and 1 guest