AnsweredAssumed Answered

Determine How i.MX6 UL booted

Question asked by Martin Townsend on Sep 30, 2019
Latest reply on Oct 16, 2019 by Diego Adrian Cuevas

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.

Outcomes