Sign in to follow this  
Followers 0
poliakospl

I2C: repeated start condition on MSP430f5529LP

3 posts in this topic

Hello everybody,

I'm trying to read some registers of the TPS65982 EVM with a MSP430f5529LP. I found out thanks to google that the Wire Library doesn't support a repeated start condition. By the way the library is not working properly ( endTransmission() makes the Launchpad freeze) so i followed the instructions given on this topic: https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/529036/1924573 (patch energia 17 with two files: twi.c and twi_sw.c) and it works correctly now. I tried next to make a "home made repeated start condition" with energia 17: i noticed in the file twi_sw a function i2c_sw_start(addresse,rw); so i tried to run it when appropriate but doesn't work...

If someone has any idea of how to make one, or if there is a library supporting the repeated start condition it would be great ;) 

I attach to this post the files I modified to make a repeated start condition (my custom function is called resend_start())

Thanks in advance,

Poliakospl

twi.c

twi.h

twi_sw.c

twi_sw.h

Wire.cpp

Wire.h

Share this post


Link to post
Share on other sites

You do not need to add code. The documentation for endTransmission() says:

//    Originally, 'endTransmission' was an f(void) function.
//    It has been modified to take one parameter indicating
//    whether or not a STOP should be performed on the bus.
//    Calling endTransmission(false) allows a sketch to
//    perform a repeated start. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0