Re: FYI: i.MX8MP ISP (RKISP1) MI registers corruption

Krzysztof Hałasa
2025-08-01T12:20:05Z

Hi,

reporting from the field :-)

At this point I've something like the following:
- run camera apps in background (so the clocks etc. are up)
- while (analyze_mi -m1 -s10000000 -r -a 0x32E21400 shows errors) {
change_clock 0x30388A80 3 3 # 50 MHz
change_clock 0x30388A80 0 3 # 200 MHz - the original settings
}

It all takes a couple of seconds.
I guess I made some minor changes to analyze_mi.c, can post it
if needed.

where change_clock writes directly do the CCM registers
(MEDIA_APB_ROOT_CLK) and sets "PRE" and "POST" dividers (3 and 3 =
800 MHz / (3 + 1) / (3 + 1) = 50 Mhz and the same for 200 Mhz.

It appears to work. I'm getting (Connection closed = reboot):

MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 9,999,999
Register 0x32E21400 mi_ctrl value 0 count 1

MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 16 = 50 MHz
MEDIA_APB EN mux 2 pre 0 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 9,999,998
Register 0x32E21400 mi_ctrl value 0 count 1
Register 0x32E21400 mi_ctrl value 0x00010001 count 1

MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 16 = 50 MHz
MEDIA_APB EN mux 2 pre 0 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 9,999,988
Register 0x32E21400 mi_ctrl value 0 count 12

MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 16 = 50 MHz
MEDIA_APB EN mux 2 pre 0 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 9,999,781
Register 0x32E21400 mi_ctrl value 0 count 206
Register 0x32E21400 mi_ctrl value 0x3C380000 count 3
Register 0x32E21400 mi_ctrl value 0x000FD200 count 5
Register 0x32E21400 mi_ctrl value 0x3C440000 count 3
Register 0x32E21400 mi_ctrl value 0x3C140000 count 2

MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 16 = 50 MHz
MEDIA_APB EN mux 2 pre 0 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 9,999,999
Register 0x32E21400 mi_ctrl value 0 count 1

MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 16 = 50 MHz
MEDIA_APB EN mux 2 pre 0 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 9,999,752
Register 0x32E21400 mi_ctrl value 0 count 237
Register 0x32E21400 mi_ctrl value 0x3C140000 count 2
Register 0x32E21400 mi_ctrl value 0x000FD200 count 4
Register 0x32E21400 mi_ctrl value 0x3C380000 count 1
Register 0x32E21400 mi_ctrl value 0x3C440000 count 2
Register 0x32E21400 mi_ctrl value 0x3C2C0000 count 2

MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 16 = 50 MHz
MEDIA_APB EN mux 2 pre 0 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition

Connection to 10.0.9.123 closed by remote host.
MEDIA_APB EN mux 2 pre 3 SYSTEM_PLL1_CLK / 4 = 200 MHz
Register 0x32E21400 mi_ctrl value 0x007A2001 count 10,000,000

Found possibly stable condition