S32V234 I2C master mode.Cant select master mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32V234 I2C master mode.Cant select master mode

461 Views
sparkcc
Contributor I

When I use S32V234 to communicate with I2C host, I need to send data. During sending, I cannot write the MSSL bit of the ICBR register, and Cannot enter MSSL position 1, that is, cannot enter the host slave mode. Moreover, every attempt to set 1 will result in Arbitration Lost.I don't know what happened!

 

used func:

 

/*!
* @brief Master/Slave module select.
*
* When the MSSL bit is changed from from 0 to 1 master mode
* is selected.
*
* @param baseAddr base address of the I2C module
* @param enable Master/Slave select
*/
static inline void I2C_Set_ModuleModSelect(I2C_Type *baseAddr, i2c_module_type moduleType) {
uint8_t regValue = (uint8_t) baseAddr->IBCR;
regValue &= (uint8_t) (~(I2C_IBCR_MSSL_MASK));
regValue |= I2C_IBCR_MSSL(moduleType);
baseAddr->IBCR = (uint8_t) regValue;
}

 

Labels (1)
0 Kudos
0 Replies