Skip to content

qn9080 I2C driver spins in endless loop #19021

@maribu

Description

@maribu

Description

As the title says.

Steps to reproduce the issue

make BOARD=qn9080dk -C examples/default flash term

Expected results

The shell pops up.

Actual results

No output on the serial.

#0  _i2c_wait_idle (i2c_dev=i2c_dev@entry=0x40087000)
    at /home/maribu/Repos/software/RIOT/cpu/qn908x/periph/i2c.c:173
#1  0x01001244 in _i2c_transfer_blocking (dev=dev@entry=0, addr_dir=58, data=<optimized out>, 
    data@entry=0x200008c6 <main_stack+1376> "\r", len=1, flags=4 '\004')
    at /home/maribu/Repos/software/RIOT/cpu/qn908x/periph/i2c.c:230
#2  0x010013c4 in i2c_write_bytes (dev=dev@entry=0, addr=addr@entry=29, 
    data=data@entry=0x200008c6 <main_stack+1376>, len=<optimized out>, flags=<optimized out>, 
    flags@entry=4 '\004') at /home/maribu/Repos/software/RIOT/cpu/qn908x/periph/i2c.c:343
#3  0x01001786 in i2c_read_regs (dev=0, addr=<optimized out>, reg=<optimized out>, 
    data=data@entry=0x200008ff <main_stack+1433>, len=len@entry=1, flags=flags@entry=0 '\000')
    at /home/maribu/Repos/software/RIOT/drivers/periph_common/i2c.c:51
#4  0x010017b6 in i2c_read_reg (dev=<optimized out>, addr=<optimized out>, reg=reg@entry=13, 
    data=data@entry=0x200008ff <main_stack+1433>, flags=flags@entry=0 '\000')
    at /home/maribu/Repos/software/RIOT/drivers/periph_common/i2c.c:31
#5  0x01000ccc in mma8x5x_init (dev=dev@entry=0x2000099c <mma8x5x_devs>, 
    params=params@entry=0x1004eec <mma8x5x_params>)
    at /home/maribu/Repos/software/RIOT/drivers/mma8x5x/mma8x5x.c:53
#6  0x01001d24 in auto_init_mma8x5x ()
    at /home/maribu/Repos/software/RIOT/drivers/saul/init_devs/auto_init_mma8x5x.c:61
#7  0x01000154 in _auto_init_module (module=0x1005750 <auto_init_xfa_saul_init_devs>)
    at /home/maribu/Repos/software/RIOT/sys/auto_init/auto_init.c:40
#8  auto_init () at /home/maribu/Repos/software/RIOT/sys/auto_init/auto_init.c:339
#9  0x01000526 in main_trampoline (arg=<optimized out>) at /home/maribu/Repos/software/RIOT/core/lib/init.c:51
      168  static uint32_t _i2c_wait_idle(I2C_Type *i2c_dev)
      169  {        
      170      uint32_t status;
      171
      172      do {         
  >   173          status = i2c_dev->STAT;          
      174      } while ((status & I2C_STAT_MSTPENDING_MASK) == 0);
      175                    
      176      i2c_dev->STAT = I2C_STAT_MSTARBLOSS_MASK | I2C_STAT_MSTSTSTPERR_MASK;
      177      return status;
      178  }

Versions

Current master.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions