Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Johann last won the day on November 24 2015

Johann had the most liked content!

About Johann

  • Rank

Profile Information

  • Location
    Austin, TX
  1. I think I may have figured it out. The result are encoded in packed BCD. Each byte consists of 2 nibbles, each nibble representing a digit. 12:09:89 -> 0x0C:0x09:0x59 12:16:00 -> 0x0C:0x10:0x00 So this suggests nothing is wrong with the formatting, but instead with my parsing. Also my hours byte is incorrect. It should be 18 (0x12) and not 12.
  2. I am running Energia 16 with a MSP430F5529LP. I am trying to use the RTC_A peripheral. Specifically I am trying to use the calendar mode, as opposed to the counter mode, with the intention of triggering on time based events. http://www.ti.com/lit/ug/slau402d/slau402d.pdf I was able to configure the RTC using DriverLib included with Energia. Unfortunately the time reported by the calendar registers are a bit wonky. Over the span of a minute, the seconds field is counting up to 89 before rolling over to 0. Additionally the minutes fields is skipping large sections of time. Using a scope I can confirm that the interrupts are firing every second, but the time reported do not look correct to me. The results seem consistently inconsistent which suggests it may be a formatting issue. Has anyone tried using the calendar mode on the RTC_A peripheral with success? time.txt
  3. Thanks! Updated my master Makefile and was able to build and deploy my code. It is rather crude, but I just modified the APPLICATION_PATH variable after including the make variables. # (if present) include definitions of the macros described above include Variables.mk APPLICATION_PATH := C:\energia-0101E0016 BOARD_DIR := $(APPLICATION_PATH)/hardware/$(PLATFORM)/variants/$(BOARD)include $(BOARD_DIR)/Board.mk . . .
  4. I am currently in the process of migrating my project from Energia 16 to Code Composer Studio 6.1.1. In my project I am using both MSP430 and MSP432 targets. I was able to import, build and deploy the MSP430 code. However I was unsuccessful with the MSP432 code. It seems that running CCS on a MS Windows box and calling xcopy with a unix paths is confusing it. At first I thought it might be something "special" in my project, but I tried it with Blink.ino and that does not work either. See build output below. **** Build of configuration Debug for project Blink **** "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all CCROOT C:/energia-0101E0016/hardware/tools/lm4f SDKROOT CLOSURE C:/energia-0101E0016/hardware/common MAINSKETCH Blink.cpp armlink Blink.obj main.obj C:/energia-0101E0016/hardware/tools/lm4f/bin/arm-none-eabi-gcc -Os @"C:/energia-0101E0016/hardware/msp432/variants/MSP_EXP432P401R/compiler.opt" -nostartfiles -Wl,--no-wchar-size-warning -Wl,-static -Wl,--gc-sections -L"C:/energia-0101E0016/hardware/common" -L"C:/energia-0101E0016/hardware/tools/lm4f/lib" Blink.obj main.obj -Wl,-T"C:/energia-0101E0016/hardware/msp432/variants/MSP_EXP432P401R/linker.cmd" -D__MSP432P401R__ -LC:/energia-0101E0016/hardware/msp432/variants/MSP_EXP432P401R -LC:/energia-0101E0016/hardware/common/libs C:/energia-0101E0016/hardware/msp432/cores/msp432/driverlib/libdriverlib.a -lstdc++ -lgcc -lc -lm -lnosys -Wl,-Map=Blink.cpp.map -o Blink.cpp.elf Binary sketch size: 26203 bytes (of a 262144 byte maximum) >>>> Done <<<< xcopy C:/energia-0101E0016\hardware\msp432\configPkg\package\cfg\energia_*.rov.xs . /Y Invalid parameter - /energia-0101E0016\hardware\msp432\configPkg\package\cfg\energia_*.rov.xs gmake: *** [Blink.cpp.bin] Error 4 gmake: Target `all' not remade because of errors. **** Build Finished **** Looking at the build process I see that the xcopy command is using the APPLICATION_PATH variable which is defined in variables.mk. I tried modifying the path, but the file is regenerated whenever I run the build process. CLOSURE ?= C:/energia-0101E0016/hardware/common CCROOT ?= C:/energia-0101E0016/hardware/tools/lm4f MAINSKETCH ?= Blink.cpp BOARD ?= MSP_EXP432P401R PLATFORM ?= msp432 BUILD_DRVLIB ?= false BUILD_BINFILE ?= false EXTRA_SOURCES = APPLICATION_PATH = C:/energia-0101E0016 . . . I tried modifying the Energia install location under Windows >> Preferences, but regardless of what I type the path always is persisted as C:/energia-0101E0016 Other than starting from scratch with a new CCS project, does anyone have suggestions/advice on how to get my existing code to build?
  5. According to the TI documentation the MSP432 has four separate serial interfaces for I2C communication. This may be beyond the scope of intended use, but it seems that Energia is limited to supporting a single serial interface for I2C communication. The TwoWire libraries have static data fields and handlers: class TwoWire : public Stream { private: static uint8_t rxBuffer[]; static uint8_t rxBufferIndex; static uint8_t rxBufferLength; static uint8_t txAddress; static uint8_t txBuffer[]; static uint8_t txBufferIndex; static uint8_t txBufferLength; static uint8_t transmitting; static void (*user_onRequest)(void); static void (*user_onReceive)(int); static void onRequestService(void); static void onReceiveService(uint8_t*, int);. . . Is it possible to simultaneously use more than one serial interface for I2C communication in Energia? Or is time to move to Code Composer Studio and MSPWare?
  6. That does not seem to be the problem. The I2C slave receives a few bytes and then no more. I modified the shipping examples, master_sender and slave_receiver, and am unable to receive data on the slave using Energia 17. Using the same hardware and running the examples from Energia 16 works as expected.
  7. I recently tried upgrading to Energia 17. I am using MSP430G2553 rev 1.5 with an existing PCB that maps SCL/SDA to pins 14 and 15 respectively. I know that by default Energia 17 uses a new SW I2C mode that maps SCL/SDA to pins 9 and 10 respectively. I would like to use the old HW I2C mode that maps to SCL/SDA to pins 14 and 15, but I have been unable to do so. I tried using the new Wire.setModule method to specify module 0. I also tried modifying the pins_energia.h file to specify #define DEFAULT_I2C 0. Neither option seems to work. If I run my exact same I2C slave source code with Energia 16, then it works as expected.
  8. I have recently encountered this problem too. My device drivers seems to be properly installed and I have selected the correct device, but I am unable to upload a blank sketch. Note that I am running 64-bit Windows 8.1. Looking at the application event log, I see the following error: It seems that x86 MFC run-time is not installed by default on newer systems. I downloaded and installed the Microsoft Visual C++ 2008 Redistributable Package (x86) and I was able to compile and upload my sketch to the device.
  9. Yes, I am using pull-up resistors. The requestEvent callback is firing, but the receiveEvent callback is not.
  10. I am trying to implement an I2C slave with a simple register map using a MSP430. The plan is for the I2C master to write an offset and then request the response. The weird thing is that my receiveEvent handler never fires if the I2C master sends a restart message. I must modify the I2C master to send the stop message before requesting data from the slave. Master: unsigned char offset = 0; void setup() { Wire.begin(); } void loop() { Wire.beginTransmission(2); Wire.write(offset); Wire.endTransmission(false); // This does not work. Must use default endTransmission(); Wire.requestFrom(2, 1, true); if (1 <= Wire.available()) { char value = Wire.read(); } delay(500); offset++; if (offset >= 0x20) { offset = 0; } } Slave: #include <Wire.h> unsigned char offset = 1; void setup() { Wire.begin(2); Wire.onReceive(receiveEvent); Wire.onRequest(requestEvent); } void loop() { } void receiveEvent(int numberOfBytes) { if (1 <= Wire.available()) { offset = Wire.read(); } } void requestEvent() { Wire.write(offset); } I2C Bus Trace LaunchPad MSP430G2 revision 1.5 MSP430G2553 Energia 0101E0016
  11. I ended up using a Particle Photon dev kit as the I2C master. I can update the Photon firmware wireless without burning a COM port. Not the ideal solution, but I can update both the master and slave programs without plugging/unplugging either device from my one machine.
  12. I have multiple MSP-EXP430G2 rev 1.5 dev kits. I am trying to create an application where one launchpad is the I2C master and sends commands to multiple connected launchpads acting as I2C slaves. When I have a single launchpad connected I can successfully upload a program. When I connect multiple launchpads I am unable to upload a program to all the devices. It seems that Energia is always uploading my program to the first enumerated serial port regardless of which port I have actively selected in the menu (Tools >> Serial Port >> COM7). I am using Energia 0101E0016. I can workaround this by unplugging all my dev kits and uploading the programs one at a time. It's a bit cumbersome, but it works. However it would be awesome if I could just leave all my dev kits connected and select which launchpad to target. Has anyone been able to upload to multiple devices without constantly plugging/unplugging?
  • Create New...