hi,
Can I read in u-boot the BOOT_MODE[1,0] register? How?
Thans,
Shony
Hi Shony
it can be read using register SRC_SBMR2.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Shony
one can attach jtag and read SRC_SBMR2.
Best regards
igor
For the IMX8MP, those flags are located at the following address:
```
# the BOOT_MODE register
boot_mode_bits_addr=0x30390073
```
You can find the exact address for your variant on its datasheel.
Then I just compared the values on that register to the one I'm expecting:
`cmp.b ${boot_mode_bits_addr} 0x2 1`
I compare the first byte of the content on `boot_mode_bits_addr` with `0x2`, and `test` to see if the result is 0 or 1.