SAM-BA Error Codes

Microchip in-system programming solution: SAM-BA

Moderators: nferre, fab

Cactus17
Posts: 2
Joined: Sun Mar 15, 2020 10:09 pm

SAM-BA Error Codes

Sun Mar 15, 2020 10:46 pm

Just some questions...kind of reaching an impasse.

I've been looking for error status code documentation for sam-ba 3.3.1 . There is some good html documentation with the sam-ba package but it appears to not include the error code descriptions.

I'm on Ubuntu Linux 19.10 using the terminal.

It appears the older 2.x version of sam-ba does not support the sam9x60 processor.(?) Thus, I went along with the recommended sam-ba 3.

For instance, I have a custom board with sam9x60. I'm attempting to get DDR2 and QSPI working.

For instance, I plug in usb:

>lsusb
Bus 003 Device 011: ID 03eb:6124 Atmel Corp. at91sam SAMBA bootloader

I can connect to the processor over the usb port. It also works over the debug uart too through usb0.

I can low level init through sam-ba. The documentation says this is a requirement.

>./sam-ba -p serial:ttyACM0:115200 -d sam9x60 -a lowlevel
Opening serial port 'ttyACM0'
Connection opened.
Connection closed.

But here is the main issue...

>./sam-ba -p serial:ttyACM0:115200 -d sam9x60 -a extram:12
Opening serial port 'ttyACM0'
Connection opened.
/home/xxx/Applications/sam-ba_3.3.1-linux_x86_64/sam-ba_3.3.1/qml/SAMBA/Applet.qml:247: Error: Could not initialize applet (status: 15)
Connection closed.

I get a status 15 code. Not sure what that means. My assumption is the ddr2 has an issue but I'd like to verify with the code. I added 12 for my particular memory chip but if I do not include the number I get the same error 15. It a Winbond chip. Tried it with a Micron memory chip too and got pretty much the same code.

Though, I can erase the nand flash...

>./sam-ba -p serial:ttyACM0:115200 -b sam9x60-ek -a nandflash -c erase
Opening serial port 'ttyACM0'
Connection opened.
Detected memory size is 536870912 bytes.
Page size is 4096 bytes.
Buffer is 8192 bytes (2 pages) at address 0x0030aca0.
NAND header value is 0xc1e04e07.
Supported erase block sizes: 256KB
Executing command 'erase'
Erased 262144 bytes at address 0x00000000 (0.05%)
Erased 262144 bytes at address 0x00040000 (0.10%)

>./sam-ba -p serial:ttyACM0:115200 -b sam9x60-ek -t 5 -a qspiflash -c erase:0:3:50
Opening serial port 'ttyACM0'
Connection opened.
/home/jostrom/Applications/sam-ba_3.3.1-linux_x86_64/sam-ba_3.3.1/qml/SAMBA/Applet.qml:247: Error: Could not initialize applet (status: 1)
Connection closed.

If I boot from an sd card, it runs the boot.bin at91 bootloader fine ( turns on the light) but when it starts u-boot the process stops. I suppose that is where its attempting to use the ddr2 ram...

RomBOOT

AT91Bootstrap 3.9.0 (Wed Oct 23 14:50:12 EEST 2019)

EEPROM: Loading AT24xx information ...
EEPROM: BoardName | [Revid] | VendorName

EEPROM: Using default information

EEPROM: Board sn: 0x11500000 revision: 0x0

SD/MMC: Image: Read file u-boot.bin to 0x23f00000
MMC: ADMA supported
SD: Card Capacity: High or Extended
SD: Specification Version 3.0X
SD/MMC: Done to load image

I looked at the sam-ba code, the point that returns the status code is an execute on an applet. So, kind of hard to track the status code down from there.

Suggestions would be appreciated. Status 1 and 15 . Maybe the bga soldering is the issue.
blue_z
Location: USA
Posts: 2035
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAM-BA Error Codes

Tue Mar 17, 2020 11:28 pm

Cactus17 wrote: There is some good html documentation with the sam-ba package
...
I looked at the sam-ba code, the point that returns the status code is an execute on an applet.
You need to look deeper for salient documentation.
For example study sam-ba_3.3.1/qml/SAMBA/Device/SAM9X60/applets/README.txt.

Cactus17 wrote: Suggestions would be appreciated. Status 1 and 15 .
You need to refer to softpack_v2.17/samba_applets/common/applet.h :

Code: Select all

#define APPLET_SUCCESS               0x00 /* Operation was successful */
#define APPLET_DEV_UNKNOWN           0x01 /* Device unknown */
...
#define APPLET_FAIL                  0x0F /* Generic/Unknown failure */

Seems like you are using various boot utilities to test the functionality of "a custom board".
You neglect to mention how this board differs from the Microchip reference design, and the status of board bring-up.
You also neglect to mention if you have made all appropriate changes to these utilities to support your board.
Instead you mention a few memory manufacturers as if their chips were interchangeable.

IMO I would not be using boot utilities to perform diagnostic tests.
That is what diagnostic programs (e.g. a memory tester) are for.
IOW functional tests are not a substitute for diagnostic or exerciser tests.

Regards
Cactus17
Posts: 2
Joined: Sun Mar 15, 2020 10:09 pm

Re: SAM-BA Error Codes

Wed Mar 18, 2020 7:33 am

Thanks for pointing out the error codes in the other project's header file. I see there are more examples that can be applicable to testing in the atmel-software-package code. I'll look it over more.

I was following steps from the linux4sam.org website which is why I was focusing on the sam-ba tool.

Cheers

Return to “SAM-BA”

Who is online

Users browsing this forum: No registered users and 1 guest