Custom SAMA5D27-SOM1 board stuck at RomBOOT message

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

oyildirim
Posts: 7
Joined: Thu Nov 14, 2019 10:31 am

Custom SAMA5D27-SOM1 board stuck at RomBOOT message

Tue Jan 07, 2020 10:34 pm

Hello,

I have SAMA5D27-SOM1-EK board and I studied it a lot. Here are the marks what I did (or experienced) before designing my custom board and having the problem:

- Compiled custom Yocto Linux image and made a bootable SD card.
- I decided to design a board that boots from microSD card same as microSD for SDMMC1 (J14) connector on SAMA5D27-SOM1-EK. I found the AT91Bootstrap and u-boot folders in the Yocto folder tree and I compiled both AT91Bootstrap and u-boot manually in their folders. After that, I prepared the SD Card. I have a bootable SD Card for booting from SDMMC1 (J14 ) connector.

I designed my custom board. It is the minimal version of SAMA5D27-SOM1-EK. For declaration of "minimal version", here are the marks:
- No Jtag circuit.
- No microbus connectors, no ISC connector pins, no PMOD pins.
- DBGU pins connected to FT232RL. Shortly, DBGU pins <-> FT232RL <-> USB Type B Virtual COM port.
- Board have 2 push buttons: RESET and WAKE UP. These button circuits are same circuit as SAMA5D27-SOM1-EK1_REVD2 Design and Manufacturing Files\REVD2\Project_Outputs\DevTools\03-10759-RD2.PDF schematic file. Shutdown pin pulled up by VDDU with 100K (No push button). DIS_BOOT pin pulled up by 3.3V with 10K.
- Supply pins schematics are same as SAMA5D27-SOM1-EK1_REVD2 Design and Manufacturing Files\REVD2\Project_Outputs\DevTools\03-10759-RD2.PDF schematic file.
- No SDMMC0 connector. Pins are floating.
- SDMMC1 connector is wired same as SAMA5D27-SOM1-EK. But there is only a connector difference. SD card is mounted upside down in the connector (compared to SAMA5D27-SOM1-EK). Card detect pins works well (When unmounted CD pin is 3.3V, when mounted CD pin is 0V).

BUT,

When I power my custom board, on my host device's virtual com port window (putty), device prints only "RomBOOT". It drops to Sam-ba monitor screen.

Here is the output of version printing:

RomBOOT
V#
v1.3 Oct 28 2016 16:04:43
>


I wanted to configure the boot registers for pointing SDMMC1 for boot device. Using Sam-ba_3.3.1, I wanted to some read and write tests to fuse register but I ended up having a read only register with the value of 0x00460fff. And than I worked on bureg0 register to make active boot register. Here is the sam-ba script output:

-- new boot config --
BSCR=0x00000004 / BUREG0,VALID
BUREG0=0x00020000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET3
BUREG1=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
BUREG2=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
BUREG3=0x00000000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET1
FUSE=0x00460fff / QSPI0_DISABLED,QSPI1_DISABLED,SPI0_DISABLED,SPI1_DISABLED,NFC_DISABLED,SDMMC0_DISABLED,SDMMC1_DISABLED,UART1_IOSET1,JTAG_IOSET3,EXT_MEM_BOOT,DISABLE_BSCR
Connection closed.


Now, I still have a "RomBOOT" messeage on my putty screen whenever I press the reset button on my custom board.
I unmount the micro SD card and mount it on SAMA5D27-SOM1-EK board, it works fine, blue led is blinking after boot process and putty drops to login screen. But on my custom board, I have only "RomBOOT" message.

Could you please help where I did wrong or missing?

Best regards,

Onur
blue_z
Location: USA
Posts: 2033
Joined: Thu Apr 19, 2007 10:15 pm

Re: Custom SAMA5D27-SOM1 board stuck at RomBOOT message

Wed Jan 08, 2020 12:28 am

oyildirim wrote:
BSCR=0x00000004 / BUREG0,VALID
BUREG0=0x00020000 / QSPI0_IOSET1,QSPI1_IOSET1,SPI0_IOSET1,SPI1_IOSET1,NFC_IOSET1,SDMMC0,SDMMC1,UART1_IOSET1,JTAG_IOSET3

...
Could you please help where I did wrong or missing?
BUREG0 is currently not setup for booting from any external memory, i.e. bit 18, EXT_MEM_BOOT_ENABLE is not set.
Curiously your board has no JTAG interface, yet you have specified I/O Set 3 for the JTAG; are you off by one bit position (i.e. 0x00020000 versus 0x00040000)?

Consider also disabling boot memories that do not exist in your system, such as SDMMC_0 (set bit 10), NFC (set bits 9:8), and SPI_x (set bits 7:4). This would inhibit all unnecessary activity on the PIOs/pins the BUREG temporarily assigns to those memories.

Consider installing AT91Bootstrap and U-Boot images in the embedded QSPI memory.
QSPI memory is last in the boot order, so this would be the boot device only when there's no SD card. You could use U-Boot as a utility to help debug your system.

Regards
oyildirim
Posts: 7
Joined: Thu Nov 14, 2019 10:31 am

Re: Custom SAMA5D27-SOM1 board stuck at RomBOOT message

Thu Jan 09, 2020 10:00 am

Thank you for the reply.

Here are the latest updates:

- at91bootstrap compiled in place in Yocto folder tree.
- u-boot compiled in place in Yocto folder tree and in sama5d27_som1_ek_qspiflash_defconfig file changed to SDMMC1 for sd card location (mmcblk0p2 to mmcblk1p2).

I flashed at91bootstrap.bin (boot.bin renamed to at91bootstrap.bin) and u-boot.bin into QSPI flash.

First try after QSPI flash:

Code: Select all

..\..\..\sam-ba -p usb -b sama5d27-som1-ek -a qspiflash -c erase
..\..\..\sam-ba -p usb -b sama5d27-som1-ek -a qspiflash -c writeboot:at91bootstrap.bin
..\..\..\sam-ba -p usb -b sama5d27-som1-ek -a qspiflash -c verifyboot:at91bootstrap.bin -> verify OK
..\..\..\sam-ba -p usb -b sama5d27-som1-ek -a qspiflash -c write:u-boot.bin:0x08000
..\..\..\sam-ba -p usb -b sama5d27-som1-ek -a qspiflash -c verify:u-boot.bin:0x08000 -> verify OK
Here is the register configuration part from sam-ba set-boot-config-gpbr.qml file:

Code: Select all

// Use BUREG0 as boot configuration word
		applet.writeBootCfg(BootCfg.BSCR, BSCR.fromText("VALID,BUREG0"))

		// write new Boot Configuration Word in GPBR
		// TODO: Set the correct boot config word value
		applet.writeBootCfg(BootCfg.BUREG0,
			BCW.fromText("EXT_MEM_BOOT,UART1_IOSET1,JTAG_IOSET1," +
			             "SDMMC0_DISABLED,SDMMC1,NFC_DISABLED," +
			             "SPI1_DISABLED,SPI0_DISABLED," +
			             "QSPI1_IOSET3,QSPI0_IOSET2"))
Yes, I forgot to change QSPI1_IOSET3 to QSPI1_IOSET2 and QSPI0_DISABLED. But here is the result while microSD car was inserted:

Code: Select all

RomBOOT
RomBOOT
RomBOOT


AT91Bootstrap 3.9.0 (Sal Kas 19 13:01:55 +03 2019)

SDHC: fix in place for SAMA5D2 SoM VDDSDMMC over-consumption errata
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
RomBOOT
RomBOOT
RomBOOT
I think AT91Bootstrap read from SDMMC1. And it never appeared again when I press the reset button.


Second try after QSPI flash:

Code: Select all

..\..\..\sam-ba -p usb -b sama5d27-som1-ek -a qspiflash -c erase
..\..\..\sam-ba -p usb -b sama5d27-som1-ek -a qspiflash -c writeboot:at91bootstrap.bin
..\..\..\sam-ba -p usb -b sama5d27-som1-ek -a qspiflash -c write:u-boot.bin:0x08000
..\..\..\sam-ba -p usb -b sama5d27-som1-ek -a qspiflash -c verifyboot:at91bootstrap.bin -> verify OK
..\..\..\sam-ba -p usb -b sama5d27-som1-ek -a qspiflash -c verify:u-boot.bin:0x08000 -> verify OK
Here is the register configuration part from sam-ba set-boot-config-gpbr.qml file:

Code: Select all

// Use BUREG0 as boot configuration word
		applet.writeBootCfg(BootCfg.BSCR, BSCR.fromText("VALID,BUREG0"))

		// write new Boot Configuration Word in GPBR
		// TODO: Set the correct boot config word value
		applet.writeBootCfg(BootCfg.BUREG0,
			BCW.fromText("EXT_MEM_BOOT,UART1_IOSET1,JTAG_IOSET1," +
			             "SDMMC0_DISABLED,SDMMC1_DISABLED,NFC_DISABLED," +
			             "SPI1_DISABLED,SPI0_DISABLED," +
			             "QSPI1_IOSET2,QSPI0_DISABLED"))
microSD card is unmounted or mounted (it doesnt matter) there is only "RomBOOT" messeage on console.

Oh the other hand, SOM prints "RomBOOT" message about every 17 seconds.

Do you have any idea how can I boot from QSPI flash?

Best regards,

Onur
oyildirim
Posts: 7
Joined: Thu Nov 14, 2019 10:31 am

Re: Custom SAMA5D27-SOM1 board stuck at RomBOOT message

Thu Jan 09, 2020 9:23 pm

I am writing this post to answer my own problem and to help other guys in the future to easily understand their situations.

- FUSE register is only allowing writing "1"s to register. You need to be VERY VERY careful when writing "1" to register because you CANT REVERSE IT BACK! By mistake, if you write wrong "1"s to register, the action you made pushes the processor in a catastrophic situation.

- On the other hand, to bypass FUSE register, sam-ba boot config change line applet.writeBootCfg(BootCfg.BSCR, BSCR.fromText("VALID,BUREG0")) DOES NOT BYPASS the FUSE register.

- You are in a "one output situation" like a baby crying: "RomBOOT". Why does a baby cry? 1) Hungry?, 2) Need nappy change?, 3) Is it cold? or 4) Is it too warm/hot?. You cant know and you try every situation to solve the problem.
Microchip must update the rom code to output the states of boot attempts which are mentioned in the SAMA5D2-Series-Data-Sheet-DS60001476C.pdf documentation section 16.5.

- Now, I wrote 0x04FFFFF to FUSE register and it doesnt even printing "RomBOOT" anymore. Processor thinks that it is in boot mode.

Tomorrow, we will produce a new baseboard. I will be very careful (hahahahha) and will update here. Or we will learn another situation and keep buying SOMs hahahahaha.

Best regards,

Onur
blue_z
Location: USA
Posts: 2033
Joined: Thu Apr 19, 2007 10:15 pm

Re: Custom SAMA5D27-SOM1 board stuck at RomBOOT message

Fri Jan 10, 2020 7:17 am

oyildirim wrote: - On the other hand, to bypass FUSE register, sam-ba boot config change line applet.writeBootCfg(BootCfg.BSCR, BSCR.fromText("VALID,BUREG0")) DOES NOT BYPASS the FUSE register.
For final product security, the DISABLE_BSCR fuse can be set to inhibit any attempt to override the fuse settings.
See https://www.at91.com/viewtopic.php?f=30 ... 203#p49203
oyildirim
Posts: 7
Joined: Thu Nov 14, 2019 10:31 am

Re: Custom SAMA5D27-SOM1 board stuck at RomBOOT message

Fri Jan 10, 2020 8:55 am

Hello blue_z,

Like I said in my previous post, SOM doesnt print "RomBOOT" on console anymore when I press the reset button.

I wanted to read the registers but sam-ba command waited too long, after I pressing the reset button here is the response:

Code: Select all

C:\Users\onuri\Downloads\sam-ba_3.3.1\examples\sama5d2\boot-config>..\..\..\sam-ba -x show-boot-config.qml
Opening serial port 'COM7'
Error: Could not switch monitor on port 'COM7' to binary mode
Connection closed.
I tested the SAMA5D27-SOM1-EK and it responses same if the microSD card inserted and booted. So, we can say that SOM on my custom board is in boot state but there is no output. I soldered DIS_BOOT pin to GND (0V DC), it didnt change. Same thing happens (It waits too long and after pressing the reset button console message appears above).

New baseboard with the new SOM in production. I wont write to FUSE register in the new board and I will write only BUREG0 register.

Best regards,

Onur
oyildirim
Posts: 7
Joined: Thu Nov 14, 2019 10:31 am

Re: Custom SAMA5D27-SOM1 board stuck at RomBOOT message

Fri Jan 10, 2020 11:36 am

Good news here!

I checked the new base board with the new SOM soldered on it. It was OK for hardware side. And I mount the microSD card that SAMA5D27-SOM1-EK boots and it DID BOOTED WITHOUT ANY REGISTER CONFIGURATION.

Thank you very much. From Monday to today (Friday), I insisted to solve previous card's problem. And I am very tired.

Thank you again.

Best regards,

Onur

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 5 guests