AnsweredAssumed Answered

i.MX6S Lock up in VPU on resume from Deep Sleep

Question asked by Gennadiy Kiryukhin on Apr 4, 2019
Latest reply on Jun 14, 2019 by Gennadiy Kiryukhin

I have a custom board based on i.MX6S that some times locks up when the system wake up from deep sleep.

Using pr_info(), the lock up was traced to one line in vpu_resume(struct device *dev) function.

Two pr_info() lines were added around pc = READ_REG(BIT_CUR_PC) located around line 1170 of mxc_vpu.c:

 

if (bitwork_mem.cpu_addr != 0) {
   u32 *p = (u32 *) bitwork_mem.cpu_addr;
   u32 data, pc;
   u16 data_hi;
   u16 data_lo;

   pr_info("Enabling vpu_clk\n");
   clk_prepare(vpu_clk);
   clk_enable(vpu_clk);

 

   pr_info("READ BIT_CUR_PC 0x%08X\n", (unsigned int)(vpu_base + BIT_CUR_PC));
   pc = READ_REG(BIT_CUR_PC);  // <<< - locks up here
   pr_info("READ BIT_CUR_PC end\n");
   if (pc) {

   ...

In the terminal window I see:

Enabling vpu_clk
READ BIT_CUR_PC 0x88A40018

and nothing after that. "READ BIT_CUR_PC end\n" is not printed.

It does not lock up every time it wake up from deep sleep. I have to constantly generate GPIO interrupts (push-button) to keep waking it up for the board to lock up on that line. The line seems to expand through a macro to one assembly instruction reading a memory location. this may point to some  deeper issue where the processor is unable to fetch a memory location (hardware register BIT Current PC (VPU_BitCurPc), section 69.7.6 of 6Solo/6DualLight Reference Manual).

clk_enable() function call two lines before returns 0 (success) every time (even when the system locks up).

 

What could be the cause and how can we go about fixing it?

 

Thank you.

Outcomes