Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Board based on SAM9x60EK stuck at AT91Bootstrap #167

Open
lumapii opened this issue Jul 11, 2023 · 0 comments
Open

Board based on SAM9x60EK stuck at AT91Bootstrap #167

lumapii opened this issue Jul 11, 2023 · 0 comments

Comments

@lumapii
Copy link

lumapii commented Jul 11, 2023

Hello all,

I'm trying to boot a custom board based on SAM9x60-EK but can't get past through AT91Bootstrap. I noticed some people had similar issues and reported it was due to the external DDR memory configuration. The custom board memory is not the same as the one in the dev kit, it is 256Mb DDR2 SDRAM 16bit (W9725G6KB-25). Here's the modified AT91Bootstrap config file I'm using.

My first attempt was trying to load the "getting-started" app from atmel softpack compiled for the SAM9x60-EK dev kit. I expected issues since I'm using a custom board but also expected it to at least give the initial print. I didn't think it would not run at all. One question I have: is there a specific memory address I have to assign to load the next stage (CONFIG_JUMP_ADDR)? I checked the "getting-started.map" file but I wasn't sure exactly what to look for. I tried some options past the 0x20000000 area but got the same results, apparently.

This is the console output with highest verbosity enabled:

RomBOOT

Dump DDRAMC Registers:
@address: 0x0 0x4 0x8 0xc
0xffffe800: 0x10 0x30086a 0xc00038 0x2023c339
0xffffe810: 0x228110f 0x72282 0x33338 0x10000
0xffffe820: 0x16 0x50008 0x0 0x0
0xffffe830: 0x6 0x777907 0x0 0x0
0xffffe840: 0x0 0x0 0x0 0x0
0xffffe850: 0x0 0x0 0x0 0x2
0xffffe860: 0x11 0xffff0000 0xffff0000 0xffff0000
0xffffe870: 0xffff0000 0xffff0000 0xffff0000 0xffff0000
0xffffe880: 0xffff0000 0x0 0x0 0x2a00002
0xffffe890: 0x0 0x0 0x0 0x0
0xffffe8a0: 0x0 0x0 0x0 0x0
0xffffe8b0: 0x0 0x0 0x1 0x0
0xffffe8c0: 0x0 0x0 0x0 0x1
0xffffe8d0: 0x0 0x0 0x0 0x0
0xffffe8e0: 0x0 0x0 0x200e008 0x200
0xffffe8f0: 0x484d5044 0x44524320 0x0 0x325
0xffffe900: 0x0 0x0 0x4030404 0x0
0xffffe910: 0x1f1f 0x0 0x4604802 0x0
0xffffe920: 0x0 0x0 0xe00 0xe00
0xffffe930: 0xf00 0xe00 0x0 0x0
0xffffe940: 0x0 0x0 0x13 0x13
0xffffe950: 0x0 0x0 0x0 0x0

AT91Bootstrap 4.0.6 (2023-07-10 17:02:39)

SD/MMC: Image: Read file getting-started.bin to 0x23f00000
MMC: ADMA supported
mmc_verify_operating_condition
SDHC: Timeout waiting for command complete
SD: Card Capacity: Standard
sd card identified with CID = 0x3534453 0x55303247 0x8000984f 0x7100b9ff
sdcard_identification success
SD: Specification Version 3.0X
SD/MMC: Done to load image

Then I modified the bootloader source code to dump some bytes starting from CONFIG_JUMP_ADDR. This way I could check the hexdump of "getting-started.bin" and see if it matched. It was the same but I don't think this completely confirms the correct operation of the memory. Can somebody give me an example code to test the DDR and check if the right configuration is being used?

Why do you think this is happening? What do you recommend to solve it? I'm thinking about getting a PIC Kit 4.0 for debug.

It's my first time here, sorry if this is not the right place or if there is a specific issue format I'm not following. I tried the Microchip forum but decided to reach out to you too. Thank you for your time!

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Atmel softpack getting-started: https://github.com/atmelcorp/atmel-software-package/tree/v2.17/examples/getting_started

AT91Bootstrap versions: 4.0.6 and 4.0.5 (tried both)

I'm using this cross compilation toolchain: arm-gnu-toolchain-12.2.mpacbti-rel1-x86_64-arm-none-eabi

SAM9x60 datasheet: https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocuments/DataSheets/SAM9X60-Data-Sheet-DS60001579.pdf

W9725G6KB DDR2 SDRAM datasheet: https://www.winbond.com/hq/support/documentation/downloadV2022.jsp?__locale=en&xmlPath=/support/resources/.content/item/DA00-W9725G6KB.html&level=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant