SAM9N12 Memory content

Discussion around AT91RM9200 and SAM9 Series Products.

Moderator: nferre

wesperos
Posts: 9
Joined: Sun Jan 15, 2017 3:37 pm

SAM9N12 Memory content

Sat Feb 17, 2018 9:42 pm

Hello,

i've been trying to make a simple program running on my custom AT91sam9n12 board and ofc, didn't make it run. I used AT91 bootstrap as a template and made some dummy USART printout. However, I didn't get it run. On the serial port, I only see "ROM Boot" banner and that's all.

I'm using SAM-BA for upload and I tried to upload the .bin file into the SRAM of the processor. When I hex dump my original program and compare it with SRAM memory content after reset ( visible in SAM-BA at the address of 0x300000), I see they're completely different.

Since the SRAM is "on the chip" already, and there are slim chances that it's corrupt, booting program from the SRAM should work without problem, right?
Question: is there some software/toolchain thing I'm missing here or is there more likely that something's wrong with my hardware (like bad soldering or something similar)?

Cheers,
blue_z
Location: USA
Posts: 1674
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAM9N12 Memory content

Tue Feb 20, 2018 1:26 am

wesperos wrote:I used AT91 bootstrap as a template and made some dummy USART printout.
IMO that's a poor choice for a "template" unless your program needs numerous configuration options and executes on several different SoCs.
The "getting started" example from the SoC's software package is a more sensible choice.

wesperos wrote:On the serial port, I only see "ROM Boot" banner and that's all.
That's not an accurate description of what you saw. And this isn't the first time you've made this mistake.
Just how reliable are any of your descriptions?

wesperos wrote:When I hex dump my original program and compare it with SRAM memory content after reset ( visible in SAM-BA at the address of 0x300000), I see they're completely different.
That's because you haven't bothered to learn how the SAM-BA utility works.
Study the SAM-BA app-note and the (hard-to-find) AT91 ISP/SAM-BA user guide
FYI the init applet was downloaded into SRAM, and that is what you retrieved after you reset the board and the SAM-BA utility.

wesperos wrote:Since the SRAM is "on the chip" already, and there are slim chances that it's corrupt, booting program from the SRAM should work without problem, right?
Wrong.
And you have results that contradict your assumption of "slim chances that it's corrupt".

wesperos wrote:Question: is there some software/toolchain thing I'm missing here or is there more likely that something's wrong with my hardware (like bad soldering or something similar)?
Neither of your two guesses is relevant.

There simply is no "boot from SRAM" as you expect.
The datasheet (which I've mentioned to you in two previously posts) clearly states that the ROM boot program will inspect and load a program from NVM, non-volatile memory.
SRAM is not NVM. SRAM is volatile memory. (Battery-backed SRAM is non-volatile, but irrelevant to this case.)

FWIW the contents of the internal SRAM is probably preserved across a reset, but a comprehensive test is required to verify that the RomBOOT has not clobbered any locations. (In the past RomBOOT has corrupted registers/memory that it should not have.)
But whatever is preserved in SRAM does not help you.

Instead of trying to "boot from SRAM", you should study that SAM-BA user guide on how to load and execute a program (i.e. the 'go' command from Table 3-15).

Regards

Return to “SAM9 ARM9 MPU”

Who is online

Users browsing this forum: No registered users and 1 guest