arch: cxd56xx: Improve i2c initialize function
During I2C communication between non-Spresense devices is performed, the I2C bus may freeze after initialization of the Spresense I2C. As a workaround, switch the pin mode to I2C at the end of the i2c initialization function. Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
This commit is contained in:
parent
d521b926aa
commit
96de2e20c1
1 changed files with 4 additions and 4 deletions
|
|
@ -1140,10 +1140,6 @@ struct i2c_master_s *cxd56_i2cbus_initialize(int port)
|
|||
|
||||
cxd56_i2c_setfrequency(priv, I2C_DEFAULT_FREQUENCY);
|
||||
|
||||
/* Configure pin */
|
||||
|
||||
cxd56_i2c_pincontrol(port, true);
|
||||
|
||||
/* Attach Interrupt Handler */
|
||||
|
||||
irq_attach(priv->irqid, cxd56_i2c_interrupt, priv);
|
||||
|
|
@ -1164,6 +1160,10 @@ struct i2c_master_s *cxd56_i2cbus_initialize(int port)
|
|||
|
||||
cxd56_i2c_clock_gate_enable(port);
|
||||
|
||||
/* Configure pin */
|
||||
|
||||
cxd56_i2c_pincontrol(port, true);
|
||||
|
||||
nxmutex_unlock(&priv->lock);
|
||||
return &priv->dev;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue