Jump to content
43oh

hogemark

Members
  • Content Count

    23
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    hogemark got a reaction from Fmilburn in Getting I2C(1), i.e. USCI_B1, to work on F5529 Launchpad   
    Yes, the default is to use "module 0", so if you do not call "setModule", you will use USCI_B0, and the pins you have been using until now.
     
    Being able to use both modules at the same time requires more code changes, so I want to try the approach to get support for choosing either module first, and then proceed to add support for both modules at the same time.
     
    Regards
    Alf
  2. Like
    hogemark got a reaction from chicken in Getting I2C(1), i.e. USCI_B1, to work on F5529 Launchpad   
    Hi again.
     
    I've now made a new pull request, I think it is simpler, so it should be more likely to be merged into Energia.
    https://github.com/energia/Energia/pull/590
     
    With this pull request, you cannot use both modules at the same time, you have to choose which one to use.
     
    So if you want to use I2C(1), i.e. USCI_B1, then do :
      Wire.setModule(1);   Wire.begin(); If you want to use I2C(0), just do as you always have :   Wire.begin();     Regards Alf Hogemark
  3. Like
    hogemark got a reaction from OzGrant in Getting I2C(1), i.e. USCI_B1, to work on F5529 Launchpad   
    Hi
     
    Here is the sample program I've used for testing so far, testing on a F5529 Launchpad :
    #include "Energia.h" #include <Wire.h> #define TMP102_ADDRESS 0x48 void setup() { Serial.begin(9600); Serial.println("ready"); delay(2000); Serial.println("go"); delay(1000); Wire1.begin(); delay(1000); Serial.println("done setup"); } void loop() { Serial.println("start reading"); Wire1.beginTransmission(TMP102_ADDRESS); Wire1.requestFrom(TMP102_ADDRESS, 2); int16_t t=(Wire1.read() << 8 | Wire1.read()) >> 4; Wire1.endTransmission(); Serial.println("done reading"); if (t>0b100000000000) t -= 4096; // Float adds 6 kB Serial.print(t*0.0625, DEC); Serial.print(" "); // Integer t *= 10; // two decimal places t += 8; // rounding Serial.print(t/160, DEC); Serial.print("."); Serial.println((t%160)/160, DEC); delay(1500); } The delays in startup and loop are not needed, I've just added them for use when I debug.
     
    I've running on energia-0101E0012 with the changes done on my branch by myself.
    I think I got the same error as you at one point, but cannot remember what fixed it.
    Maybe you miss the "Energia.h" include ?
    There are some cleanup I have to do for the "includes".
    I think that is causing your problem, because when I do not include it in my sample, I get the same error as you.
     
    Have you removed the twi.c/.h file, like I've removed them from my branch ?
     
    I will be busy for the next week, but thereafter I will do proper testing, and clean up and improve the code, so that it is ready for a pull request and a code review.
     
    Regards
    Alf
  4. Like
    hogemark got a reaction from abc in Configuring CCSv6 to debug Energia   
    CCSv6 has two compilers, TI's own compiler and GCC 4.8.0 for MSP430, which is developed by Redhat.
    When you import a Energia sketch into CCS, CCS will use the gcc compiler (version 4.6) which is part of Energia to do the build.
     
    I used CCSv6 this weekend to debug my Energia sketch using I2C, and it was very helpful. But I saw some problems when using the debugger, and have posted to the CCSv6 forum at TI (http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/329738.aspx?pi296443=1), and have some ongoing discussion there, where there are suggestions that the strangeness observed during debugging is caused by the Gcc 4.6 version, which is not fully supported by CCSv6.
     
     
    Regards
    Alf
  5. Like
    hogemark got a reaction from pabigot in How to power F5529 with USB power supply   
    Hi
     
    Reading http://www.ti.com/lit/ug/slau533a/slau533a.pdf should give you answers, it has some pages on power sources.
    I was struggling with the same issue, but got it to work.
    You have to remove some of the headers, I think it was the "SBW*" ones, but read the pdf, and report back exactly what pin headers you had to report.
     
    Alf
×
×
  • Create New...