Blinking LED on SAMA5D4 Xplained Ultra

Moderator: nferre

xargs
Posts: 3
Joined: Wed Jan 29, 2020 9:52 pm

Blinking LED on SAMA5D4 Xplained Ultra

Wed Jan 29, 2020 10:49 pm

I'm trying to run the "Getting started" demo from atmel-software-package/examples/getting_started. I believe I should be able to run this example out of SRAM. I've built the code with:

make TARGET=sama5d4-xplained VARIANT=sram

which results in a getting-started.bin in the build/sama5d4-xplained/sram directory.

Then,

sam-ba_3.3.1/sam-ba -p serial -b sama5d4-xplained -t 5 -a nandflash -c erase

sam-ba_3.3.1/sam-ba -p serial -b sama5d4-xplained -t 5 -a nandflash -c write:build/sama5d4-xplained/sram/getting-started.bin

Everything runs without errors, but D10 just remains on steady.

What am I doing wrong?
blue_z
Location: USA
Posts: 2033
Joined: Thu Apr 19, 2007 10:15 pm

Re: Blinking LED on SAMA5D4 Xplained Ultra

Fri Jan 31, 2020 12:48 am

xargs wrote: I'm trying to run the "Getting started" demo from atmel-software-package/examples/getting_started.
Which version?
What toolchain are you using?

xargs wrote: Then,
...
sam-ba_3.3.1/sam-ba -p serial -b sama5d4-xplained -t 5 -a nandflash -c write:build/sama5d4-xplained/sram/getting-started.bin
That's a reckless way to use the SAM-BA write command; you haven't specified a NAND displacement.
You're installing a boot program, but not using the 'writeboot' command, which would install the PMECC parameters header and fix up the ARM exception vector for the binary.
The NAND chip should be ONFI compliant, so the missing PMECC header is of no consequence.
But my build of the 2.17 example does not have a proper ARM exception vector that satisfies the RomBOOT requirements, so I'm surprised your install seems to boot.

xargs wrote: Everything runs without errors, but ...
You have to elaborate because that's a statement that conveys no diagnostic information.
xargs wrote: ... D10 just remains on steady.
Are you reporting the correct part number? What color is this LED?
(At least you wrote this description concisely, i.e. without using a negative.)
There are four LEDs on the SAMA5D4-XULT. Two are red, and two are blue.
I can get three of the LEDs (including both "user" LEDs) to blink with the program.

What is each LED doing on program start?
(Seems like the program documentation is inaccurate/ambiguous: "Two LEDs should start blinking on the board". I do see "two" blinking LEDs, but it's not the two "user" LEDs.)

What happens when you press the user push button?

What happens when you use the four command keys?
For that matter, what is displayed on the serial console?

According to your previous claim about "everything", all of these input directives perform as expected?
Assuming "everything" includes the four command keys, then "D10 just remains on steady" has to imply that these command keys are ineffective, and therefore do not "run[s] without errors"!

Regards
xargs
Posts: 3
Joined: Wed Jan 29, 2020 9:52 pm

Re: Blinking LED on SAMA5D4 Xplained Ultra

Fri Jan 31, 2020 8:56 am

atmel-software-package Version 2.17 - 2019-09

gcc version 8.2.1 20181213 (release) [gcc-8-branch revision 267074] (GNU Tools for Arm Embedded Processors 8-2018-q4-major)

By "everything runs without errors", I was referring to the make and sam-ba command lines.

The LED I was referring to is blue and labeled "D10 USER".
What is each LED doing on program start?
I have no reason to believe the program is actually starting, but D10, D8, and D4 are on solid, and D6 is off. The BP1 button has no effect on the LEDs.
build of the 2.17 example does not have a proper ARM exception vector that satisfies the RomBOOT requirements
This is my first foray into this type of part, but my getting-started.bin starts with

Code: Select all

0000000  18 F0 9F E5 18 F0 9F E5 18 F0 9F E5 18 F0 9F E5
0000010  18 F0 9F E5 00 00 00 00 14 F0 9F E5 14 F0 9F E5
and I was under the impression the E5 bytes were what the boot ROM was looking for.

I see RomBOOT on the serial console when I press the RESET button, and nothing else. Typing 0, 1, 2, s, or b on the console has no effect on the LEDs and no response on the console.
blue_z
Location: USA
Posts: 2033
Joined: Thu Apr 19, 2007 10:15 pm

Re: Blinking LED on SAMA5D4 Xplained Ultra

Mon Feb 03, 2020 11:27 pm

The solution to your boot failure has already been mentioned, i.e. use the SAM-BA 'writeboot' command.

Regards
xargs
Posts: 3
Joined: Wed Jan 29, 2020 9:52 pm

Re: Blinking LED on SAMA5D4 Xplained Ultra

Tue Feb 04, 2020 12:12 am

Thanks, "writeboot" was the missing bit.

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 4 guests