cancel
Showing results for 
Search instead for 
Did you mean: 

I2C not working with STM32F103C6 and STM32F103C8

RShiv.1
Senior

we have been trying to get the I2C up on both the controller and no responses from anyone the cubeMx issue if I2C is really a problem..Kindly respond as we are trying to get I2C up ..

requesting the experience forum experts to respond.

Thanks

Ravi

63 REPLIES 63
RShiv.1
Senior

0693W00000WJQdyQAH.pngGet ready status is not seen to check whether sensor is ready to send??..

tried adding that piece of code was well...

any change let me know

thanks and regards

Ravi

AScha.3
Chief II

so no error, sensor and I2C working ok.

did you power cycle?

power off sensor and STM board, wait, then power up again. sensor need power restart...

If you feel a post has answered your question, please click "Accept as Solution".
RShiv.1
Senior

yes I2C is working ..

0693W00000WJQhqQAH.pngdid the power cycle....power off both sensor and STM board...still not getting any values...

RShiv.1
Senior

added the code for reference

RShiv.1
Senior

when there are no values and printing only dddd..I used to do the power cycle and then get the version number properly...but here I am not seeing any values.....let me know any change...thanks

RShiv.1
Senior

I was referring to my earlier code when I had the version number print ON

AScha.3
Chief II

Oo, sensor want/need crc byte also... ****.

If you feel a post has answered your question, please click "Accept as Solution".
RShiv.1
Senior

I thought initially...but in my earlier I used to get the version number fine without sending 0xC2 as the CRC...well...let me know the change..so that I will try making here...just at the start we shall add or for every SCD30_cnt_measurement[0] = 0xC2 buffer value??

RShiv.1
Senior

SCD30_cnt_measurement[0]=0xC2;

  SCD30_cnt_measurement[1]=0x00;

  SCD30_cnt_measurement[2]=0x10;

  SCD30_cnt_measurement[3]=0x04; //0x400 = 1020 mbar

  SCD30_cnt_measurement[4]=0x00;

is this the change you are referring??

RShiv.1
Senior

code reference to check version number also..

0693W00000WJQlnQAH.png 

..I have added different pattern like..sending stop bit first ..then soft reset..then 2s interval..then firmware...then start...then get ready ...then read....is this pattern correct..do we need to follow this...comparing this with workiing Rpi model we have...let me know your thoughts...