Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


hogemark last won the day on June 29 2015

hogemark had the most liked content!

About hogemark

  • Rank

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
  • Interests
    Weather stations
  • Github

Recent Profile Visitors

476 profile views
  1. 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. Hi If someone is interested in being able to choose between using the SPI0 and SPI1 modules on Launchpad F5529, http://energia.nu/img/LaunchPadMSP430F5529.jpg, I have attempted to make changes which allows you to do so. The code is here : https://github.com/alfh/Energia/tree/feature_spi_choose_module This is based on my work to get the two I2C modules to work, it seemed pretty easy to get the same functionality enabled for SPI modules. But my changes for SPI is fully untested, I have only tested that it compiles. The reason is that I do not have any devices to test SPI with.
  3. 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
  4. Thanks, I've made a git pull request for this now, to get the process started to get the code incorporated into the official build, https://github.com/energia/Energia/pull/398 Regards Alf
  5. Hi I think you need to add the #include "Energia.h" at the top of your sketch, as mentioned in my previos post 10. April 2014, and confirmed 11. April 2014. Regards Alf
  6. 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(); Seri
  7. Hi Finally, I have working code that allows me to use Wire1 for using the USCI_B1 module, and Wire for using the USCI_B0 module. The code is here : https://github.com/alfh/Energia/tree/feature_i2c_uscb1 I still need to clean up the code, and do more initial testing, I have now just got it to work in my sample program, to use Wire1 for accessing the USCI_B1. I am also confident that it will work using Wire in the same sample program for accessing the USCI_B0, but I have not tested that yet. The code will also need review by experts.. I know some simple optimizations can be mad
  8. Hi again I've tried to pursue option 1. and 2. above, but the I2C code in driverlib for Tiva and MSP430 are quite different, and my driverlib and i2c skills are not good enough, so I am abandoning those options. I think I will now pursue option 4. I've come a few steps further today. I use CCSv6 for debugging, it is useful. But debugging the port mapping setting proved to be difficult. At least until I found out that when running the debugger and stepping through, the port mapping register would always turn back to read-only before the code was able to manipulate the registers
  9. Hi I have now looked into the I2C implementation for Tiva in Energia, and investigated DriverLib for MSP430, which is only supported for 5x and 6x devices as of now. The Tiva implementation seems to rely less on interrupts, and the code seems simpler and cleaner. After doing some more investigation, I see the following alternatives for implementing support for having multiple I2C modules active on the MSP430 in Energia. 1. Make a TwoWire class for MSP430, inspired by the Tiva TwoWire class in Energia, and use DriverLib for the implementation for 5x and 6x devices. Just leave the current Wi
  10. 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 o
  11. Hi again I've now pushed my latest code to GitHub, https://github.com/alfh/Energia/tree/feature_i2c_uscb1. So using this code, I can use a #define to choose if I want to use USCI_B0 and USCI_B1 module. The code it still not ready to be merged. I need to figure out how to handle the "port map controller" code in wiring_digital.c, as of now I've had to comment that code out in order for my code to work. And I want to be able to use both modules at the same time, so I guess more code restructuring is needed for that. I would appreciate feedback on how you think support for more th
  12. What about Linux ? It seems like the libmsp430.so file on Energia is 64-bit, while on the CCS6beta4 that I have, it's 32-bit. ccs6/ccsv6/ccs_base/DebugServer/drivers/libmsp430.so libmsp430.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped energia-0101E0012/hardware/tools/msp430/bin/libmsp430.so libmsp430.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=0x491eb4dd8b6126e9981db52d231815149f12a7d3, not stripped Where can I get the 64bit libmsp430.so from for CCSv6 ? Regards Alf
  13. 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
  14. Finally, got it to work ! I now have USCI_B1 working in Energia on F5529 Launchpad... The problem is actually happening in wiring_digital.c in the method "pinMode_int", and is related to the port map controller for port4. I noticed that my standalone driverlib example did not do any work against the port map controller. When debugging the energia code, I could not see that the wiring_digital made any changes to the PortMap4 controller, except for presenting the password and unlocking the port map controller for a brief moment. But it does not seem to change the config for the P4.1 and P
  15. Ok, after reading the datasheet for F5529 and the family guide, I am pretty sure I know the reason. For port 4.1 and 4.2 for USCI_B1, I have to use the port map controller to set up the ports correctly. I'll investigate more, and let you know the results. Alf
  • Create New...