2020-03-15 10:12 AM
I am using standard peripheral library for STLUX and using stm8 library for I2c interface. I have tried with all the examples in libraries which are using interrupt handlers. Also, i have tried the online examples for stm8 using poll methods. Nothing is working for me till now.
I am using Pin 17, Pin 18 for I2C interface. I have uploaded the code in attachment.
Need some help from ST community.
2020-03-15 10:50 PM
Haven't looked at your code.
There's a concise summary of the I2C bus by TI at http://www.ti.com/lit/an/slva704/slva704.pdf.
Some things to check with a CRO...
2020-03-16 04:27 AM
Thanks for the response.
I have gone through the document you have mentioned.
As far as i have dig in, the problem is in the configuration registers for Pins I am using for I2C.
The configuration for using those pins as I2C interface is not found in the header files for STLUX385.
There are no configuration files for STNRG388A.
I am lost there, any ST team member who can help me out.
Regards
2020-03-16 03:05 PM
STNRG388A's registers are described in RM0380, which can be found at https://www.st.com/content/ccc/resource/technical/document/reference_manual/08/49/09/d6/23/dd/44/4a/DM00114159.pdf/files/DM00114159.pdf/jcr:content/translations/en.DM00114159.pdf.
2020-03-17 01:58 AM
Thanks for the response, Yes i had gone through that document.
I am able to communicate with my testing device using Pin 20, 21 (SDA, SCL). But i want to use the I2C interfac on Pin 17, 18(SDA, SCL). I am using STLUX385 standard peripheral library which has no definiation of MSC_IOMXP2 register. After going through the datasheet the register is in Indirect Area which i'm unable to access.
How can i enable Alternate Functions of P2 using MSC_IOMXP2 register which is in Indirect Access Area?
2020-03-17 02:32 PM
Equipped with the RM you should be able to make your software do anything.
I've not used this part nor library, and if you must use that library I can't help.