2022-05-24 04:09 AM
Hello I'm sharan from yali mobilities. Here we are shifting from old spc5 studio to latest version spc5 studio 6.0. For testing I2C, I have used Arduino as a slave device. The programme which I have writen is attached as image. Arduino sends a inter value when an request event is occured. The programme runs in old spc5 studio, but it's not working in spc5 studio 6.0. I have used same configurations, setups and same board.
I have tried I2C write function it works properly for all the devices, which I have tested. If any one knows the solution kindly reply.
Thank you for reading.
Solved! Go to Solution.
2022-06-01 11:29 PM
Hello,
would you please try with this fixed file and let us know ?
====patch====
@@ -619,8 +619,12 @@ static int i2c_hw_read(void *priv, uint8_t dev_addr, uint16_t reg_addr, uint8_t
i2cd->i2c_tagp->IBCR.B.RSTA = 0x1;
i2cd->i2c_tagp->IBCR.B.IIC_MS = (uint8_t)i2cd->mode;
i2cd->i2c_tagp->IBCR.B.IIC_TX = 0x1;
- i2cd->i2c_tagp->IBDR.R = i2cd->dev_addr| I2C_HW_READ;
- i2cd->state = I2C_MASTER_READ_DUMMY_DATA;
+ if (reg_addr_size == I2C_16_BIT_REG_ADDRESS) {
+ i2cd->i2c_tagp->IBDR.R = i2cd->dev_addr;
+ } else {
+ i2cd->i2c_tagp->IBDR.R = i2cd->dev_addr| I2C_HW_READ;
+ i2cd->state = I2C_MASTER_READ_DUMMY_DATA;
+ }
} else {
/* In slave mode it reads until no data on the I2C bus */
i2cd->i2c_tagp->IBAD.R = dev_addr;
=============
-Best regards,
-Olivier
2022-05-24 05:15 AM
Hello Sharan ,
Could you send me your installation details ?
I need the version of SPC5RLA used for your device
You can revert the drivers installation from 1.17.0 to 1.16.0 , 1.14.0.
Best Regards
Erwan
2022-05-25 12:37 AM
Could you tell me please, where can I find these details and I'm having SPC58EC80 disp board. Thank you
2022-05-25 04:14 AM
Could you tell me please, where can I find these details and I'm having SPC58EC80 disp board. Thank you
2022-06-01 03:03 AM
go to Menu Help-> About SPC5Studio
click on Installation Details
use Filter SPC58EC
2022-06-01 11:03 PM
Here I've attached the image. I checked for the update and it's upto date. Kindly look into it. Thank you.
2022-06-01 11:29 PM
Hello,
would you please try with this fixed file and let us know ?
====patch====
@@ -619,8 +619,12 @@ static int i2c_hw_read(void *priv, uint8_t dev_addr, uint16_t reg_addr, uint8_t
i2cd->i2c_tagp->IBCR.B.RSTA = 0x1;
i2cd->i2c_tagp->IBCR.B.IIC_MS = (uint8_t)i2cd->mode;
i2cd->i2c_tagp->IBCR.B.IIC_TX = 0x1;
- i2cd->i2c_tagp->IBDR.R = i2cd->dev_addr| I2C_HW_READ;
- i2cd->state = I2C_MASTER_READ_DUMMY_DATA;
+ if (reg_addr_size == I2C_16_BIT_REG_ADDRESS) {
+ i2cd->i2c_tagp->IBDR.R = i2cd->dev_addr;
+ } else {
+ i2cd->i2c_tagp->IBDR.R = i2cd->dev_addr| I2C_HW_READ;
+ i2cd->state = I2C_MASTER_READ_DUMMY_DATA;
+ }
} else {
/* In slave mode it reads until no data on the I2C bus */
i2cd->i2c_tagp->IBAD.R = dev_addr;
=============
-Best regards,
-Olivier
2022-06-09 12:07 AM
I have replaced those two lines with these condition lines. But it doesn't work. The result as I2C_ERROR_BUS_BUSY.
2022-06-09 02:05 AM
Hello,
would you please provide your structure:
-Best regards
Olivier
2022-06-11 02:37 AM
Kindly look into it.