With 2 headache issues being solved, now I am relaxed. At the same time, a few things need to be learnt from.
summary of 2 issues:
#1 Kernel crash or system hang, if capture is started 5 ~ 10s after bootup. the crash point is in VPE isr handler most times. and the kernel developer’s analysis indicates that there is memory corruption.
— I have narrowed down to the VPE operation, as the issue disappeared if there is no VPE operation.
#2 Display shows stripes then system resets, if there is capture activity involved right after bootup.
— EMIF registers were corrupted (JTAG debug), most of time 32 bytes. By setting up a firewall against EMIF registers, the analysis showed that it is VIP or VPE hit the exception a few times.
I tried the VPE max_size to restrict VPDMA to write over boundry, and it doesn’t help. then, I have no idea.
There is an idea from some else: VIP initialisation might bring some issues here. so most people focused on the VIP instantiation sequence, delay, ..coordination.. If that’s the reason, it looks that nothing I can do…
Correct way to continue:
if VIP intialization doesn’t solve the problem, we need focus on the VPE driver — It is a memory corruption, where are we writing during an VPE VPDMA operation? My first idea is the VPE output buffer, and didn’t check the code clearly. .. Actually, there is another write: write descriptor, which is provided to VPDMA to write into during a VPDMA transaction.
Also, register dump and dma configuration (extremely important! as it might be initialised on the stack before being passed the the hardware) are essential if the system is still reachable (via JTAG), as they will give some clue about what might be wrong.
the dma configuration printed in issue #2 showed that a write descriptor address is a random value (as it is defined on the stack and not gets initialised to 0), which leads to VPDMA writing to EMIF registers.