SAM-BA can't connect to SAMA5D3 Xplained

Microchip in-system programming solution: SAM-BA

Moderators: nferre, fab

GuicSeb
Posts: 5
Joined: Fri Apr 24, 2020 12:16 pm

SAM-BA can't connect to SAMA5D3 Xplained

Fri Apr 24, 2020 2:15 pm

Hello,

I've recently received my SAMA5D3 Xplained board.
It's running smoothely the linux demo that was initially falshed on the board.

Problems started to happen when I tried to send new images (obtained from linux4sam website, no recompilation on my side) on the board.
I follow the usual press reset button, keep it pressed, unplug NAND_CS jumper, release reset button and after a few seconds replug the jumper.

When using sam-ba on my linux VM, it's throwing one error for which I couldn't find any solutions.
Here's my commands:

Code: Select all

root@host:/opt/sam-ba_3.3.1# ./demo_linux_nandflash.sh 
Opening serial port 'ttyACM0'
Connection opened.
-I- === Initilize low level (system clocks) ===
/opt/sam-ba_3.3.1/qml/SAMBA/Applet.qml:247: Error: Could not initialize applet (status: undefined)
Connection closed.
I tried many times using also 3.2.0 version of sam-ba but I'm always running in the same problem.

I also tried on the sam-ba client on windows with no luck also.

As I don't have a deep knwoledge of how these applets work on their side, I don't really know what's hapenning.

Does anyone have a solution?
blue_z
Location: USA
Posts: 2079
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAM-BA can't connect to SAMA5D3 Xplained

Mon Apr 27, 2020 3:34 am

The install script is failing during the low-level applet.
I do not have a SAMA5D3 Xplained board to replicate the procedure you describe.

You could try to execute the applet directly with SAM-BA and obtain trace output.
In addition to the USB CDC/ACM connection to the PC host, connect a suitable 3.3V adapter (e.g. a USB converter or RS-232 transceiver) to the J23 header for a connection to the DBGU port.

After a proper reset and the following SAM-BA command:

Code: Select all

$ ./sam-ba -b sama5d3-xplained -a lowlevel -t 5 -p serial
You should expect to see something like the following from the DBGU port:

Code: Select all

RomBOOT                                                                        
                                                                               
Applet 'Low-Level' from softpack 2.17 (v2.17).                                 
Current processor clock: 96 MHz                                                
Current processor clock: 528 MHz                                               

BTW use of root privileges (i.e. the sudo command) should not be necessary to use the SAM-BA utility or run the install script, and probably indicates improper system administration on your PC, i.e. failure to add your username to the dialout and plugdev groups.

Regards
GuicSeb
Posts: 5
Joined: Fri Apr 24, 2020 12:16 pm

Re: SAM-BA can't connect to SAMA5D3 Xplained

Mon Apr 27, 2020 4:43 pm

I've tried to plug a serial connector on the DBGU port to analyse what's going wrong.

Once loaded on the sam-ba I can read the following on the DBUG port:

Code: Select all


RomBOOT
And if I try to write the command :

Code: Select all

 ./sam-ba -b sama5d3-xplained -a lowlevel -t 5 -p serial
Nothing more appears on the debug terminal.

Side note: sam-ba runs well without sudo privileges I was just wondering if the applet wasn't because of that.

Best regards
blue_z
Location: USA
Posts: 2079
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAM-BA can't connect to SAMA5D3 Xplained

Tue Apr 28, 2020 1:30 am

GuicSeb wrote: And if I try to write the command :

Code: Select all

 ./sam-ba -b sama5d3-xplained -a lowlevel -t 5 -p serial
Nothing more appears on the debug terminal.
And what is displayed in the shell terminal in response to the SAM-BA command?
GuicSeb
Posts: 5
Joined: Fri Apr 24, 2020 12:16 pm

Re: SAM-BA can't connect to SAMA5D3 Xplained

Tue Apr 28, 2020 3:21 pm

Display was same as before:

Code: Select all

Opening serial port 'ttyACM0'
Connection opened.
-I- === Initilize low level (system clocks) ===
/opt/sam-ba_3.3.1/qml/SAMBA/Applet.qml:247: Error: Could not initialize applet (status: undefined)
I tried to switch to earlier versions of sam-ba (previously was running either 3.2.0 or 3.3.1) to move with the version 2.17 and used the following command:

Code: Select all

host:/opt/sam-ba_2.17$./sam-ba /dev/ttyACM1 at91sama5d3x-xplained -a lowlevel -t 5
-I- Waiting ...
-I- TCL platform : Linux
-I- SAM-BA CDC 2.17  on : linux
-I- Retrieved arguments from command line :
-I- argv 0 : /dev/ttyACM1
-I- argv 1 : at91sama5d3x-xplained
-I- argv 2 : -a
-I- Connection /dev/ttyACM1
-I- Connection : /dev/ttyACM1 (target(comType) = 0)
-I- Board : at91sama5d3x-xplained
-I- Traces Level : 4
-I- target(handle) : file5
-I- sourcing board description file /opt/sam-ba_2.17/tcl_lib/at91sama5d3x-ek/at91sama5d3x-ek.tcl
Read device Chip ID at 0xFFFFEE40 --- get 0xffffffff8a5c07c2
-I- Found chip : at91sama5d3x (Chip ID : 0xffffffff8a5c07c2)
-I- Loading applet applet-lowlevelinit-sama5d3x.bin at address 0x308000
It get stucked here without moving forward and I had to kill the process.

On the DBGU port I just read the usual:

Code: Select all

RomBOOT



RomBOOT





The different RomBOOT are the trace of my different reboots between attemps as it seems that the sam-ba on the board is stuck after and I get no further connexions:

Code: Select all

host:/opt/sam-ba_2.17$./sam-ba /dev/ttyACM1 at91sama5d3x-xplained -a lowlevel -t 5
-I- Waiting ...
-I- TCL platform : Linux
-I- SAM-BA CDC 2.17  on : linux
-I- Retrieved arguments from command line :
-I- argv 0 : /dev/ttyACM1
-I- argv 1 : at91sama5d3x-xplained
-I- argv 2 : -a
-I- Connection /dev/ttyACM1
-I- Connection : /dev/ttyACM1 (target(comType) = 0)
-I- Board : at91sama5d3x-xplained
-I- Traces Level : 4
-I- target(handle) : file5
-I- sourcing board description file /opt/sam-ba_2.17/tcl_lib/at91sama5d3x-ek/at91sama5d3x-ek.tcl
And the programm get stucked here.
I don't know if this strange behaviour is linked to the previous one.

I don't know if this gives you more info about what's going on.

Also to mention that this problem doesn't come from just one card as I have 2 and they act the same.

Best regards.
blue_z
Location: USA
Posts: 2079
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAM-BA can't connect to SAMA5D3 Xplained

Thu Apr 30, 2020 7:54 pm

GuicSeb wrote: Display was same as before:

Code: Select all

Opening serial port 'ttyACM0'
Connection opened.
-I- === Initilize low level (system clocks) ===
/opt/sam-ba_3.3.1/qml/SAMBA/Applet.qml:247: Error: Could not initialize applet (status: undefined)
That's a bogus report.
SAM-BA could not possibly output such text because the third line is from the install script for the demo.
IOW that's a lazy copy'n'paste using a previous post!

GuicSeb wrote: I don't know if this gives you more info about what's going on.
An accurate report instead of a bogus one is the kind of information needed.
This is starting to look like a new (?!!!?) manifestation of a SAMA5D3x errata, where the Xmodem functionality of the ROM code is broken.
Atmel Tech Support used this vague errata as the reason why the SAM-BA 2.x utility cannot be used with the DBGU port of a SAMA5D3x, but didn't bother to explain (to me) why the USB CDC/ACM connection is not affected (except on your board?).
GuicSeb
Posts: 5
Joined: Fri Apr 24, 2020 12:16 pm

Re: SAM-BA can't connect to SAMA5D3 Xplained

Mon May 04, 2020 9:50 am

Sadly this is the only thing I get:

Code: Select all

Opening serial port 'ttyACM0'
Connection opened.
-I- === Initilize low level (system clocks) ===
/opt/sam-ba_3.3.1/qml/SAMBA/Applet.qml:247: Error: Could not initialize applet (status: undefined)
It is not a "bogus", it is what I have on my screen when running the command.
That's why I came to post here because no one seems to have run into this kind of trouble, people get a different status.
The addition of the extra debugging command didn't bring any more information on the terminal.

The communication seems to work according to the output that I get from the 2.17 version of sam-ba:

Code: Select all

Read device Chip ID at 0xFFFFEE40 --- get 0xffffffff8a5c07c2
-I- Found chip : at91sama5d3x (Chip ID : 0xffffffff8a5c07c2)
But unfortunately it seems that the applet cannot be loaded too with this version.

I must add that I never managed to flash any software to these SAMA5D3 Xplained so they just run the linux4sam example from factory.
GuicSeb
Posts: 5
Joined: Fri Apr 24, 2020 12:16 pm

Re: SAM-BA can't connect to SAMA5D3 Xplained

Tue May 05, 2020 4:01 pm

Follow up on my own answer.

After many tries over different version of sam-ba and OS, I managed to find a configuration that works.

I had to settle on using sam-ba 3.3.1 on Windows. Nothing else had to be change for that to work: no change in the physical procedure, the qml script or the linux image files. So I have not yet any confirmation over what is not working with the other combinations (OS/sam-ba versions) that I previously used.

I have contacted the support about this issue to see how I can manage to make it work on my Linux OS which would be a more desirable and confortable solution.
I'll had another follow-up on this thread if I ever have a better understanding of it.

Return to “SAM-BA”

Who is online

Users browsing this forum: No registered users and 7 guests