Hi,
I have a requirement to determine whether the i.MX6UL booted via the serial downloader or whether it booted normally via the eMMC. I can't find a register in the reference manual. I've booted using both methods and dumped out the SRC registers and noticed that one of them is different SRC_GPR10:
When serial downloading the register is set to 0x40000000
U-Boot> md.l 0x020D8044 1
020d8044: 40000000 ...@
When booting from eMMC this register is 0x00000000
U-Boot> md.l 0x020D8044 1
020d8044: 00000000
This register is undocumented and the reference manual stats it is used by the ROM code. I was wondering whether reading this register and specifically bit 30 was a method of determining whether the ROM code had serial downloaded U-Boot or not.
The only other register I have currently found is that the Boot ROM seems to enable GPIO2 clocks in the CCM registers.
Is there a better way of determining the boot mode used?
Many Thanks,
Martin.
Hi Radhika,
Thank you for the reply but this only reflects the state of the boot pins and doesn't tell us how the BootROM has booted. I probably should have been more specific. As an example; the boot pins are configured to boot from eMMC but the bootloader in the eMMC is not there then it will fall back to serial downloader and we use this to load the bootloader. If I check SRC_SBMR2 then it will indicate boot from eMMC. I'm looking for a register that will tell me how did the BootROM actually boot.
Best Regards,
Martin.
Hello,
The ROM code uses the state of BOOT_MODE and eFuses. If you configured the eFuses and the BOOT_MODE to boot from the eMMC, the ROM code will go to see how you configured first the BOOT_MODE and then how you have burned the eFueses or you configured the GPIOs. If the ROM code does not find a boot loader in the specified booting mode., it will go directly into serial download mode. The nearest to what you are mentioning is the SRC_SBMR2 register. However, how you mentioned before, this will only tell you how the boot mode is configured.
Hope this information could help you.
Best regards,
Diego.
Hi Martin Townsend,
You can read the value of SRC Boot Mode Register 2 (SRC_SBMR2) (0x20D801Ch) to determine the boot mode. Refer section 49.7.5 from imx6ul reference manual (bit number 24-25 of SRC_SBMR2 shows BMOD[1:0]).
Regards,
Radhika Somaiya.