i2c driver problem after resume from standby

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: barthess, RoccoMarco

skute
Posts: 64
Joined: Wed Aug 29, 2012 10:17 pm

Re: i2c driver problem after resume from standby

Postby skute » Fri Mar 11, 2016 5:20 pm

Code: Select all

  osalDbgCheck(chk);

  osalDbgAssert(i2cp->state == I2C_READY, "not ready");

if(wkup){
      chprintf((BaseSequentialStream *)&SERIAL_PORT, "%s: %d\n\r",__func__,i++);
      chThdSleepMilliseconds(250);
  }

  osalSysLock();
  i2cp->errors = I2C_NO_ERROR;
  i2cp->state = I2C_ACTIVE_TX;
  if(wkup){
      chprintf((BaseSequentialStream *)&SERIAL_PORT, "%s: %d\n\r",__func__,i++);
      chThdSleepMilliseconds(250);
  }
  rdymsg = i2c_lld_master_transmit_timeout(i2cp, addr, txbuf, txbytes,
                                           rxbuf, rxbytes, timeout);



The above code appears to be violating ChibiOS state policy. Check out http://chibios.sourceforge.net/docs3/rt/concepts.html for what is possible after entering an I-Locked context. Do you have the state checker enabled?


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 14 guests