Jump to content


  • Content Count

  • Joined

  • Last visited

Posts posted by aegotheles

  1. So it was obvious, you can select the alternate serial port by simply initializing Serial1.begin(XXXX).  However, initially this didn't work, because when I made the msp430fr5949 pin map above the correct pin assignments for DEBUG_UART and AUX_UART were switched.  They should be (I believe) -

    static const uint8_t DEBUG_UARTRXD = 22;  /* Receive  Data (RXD) at P2.1 */
    static const uint8_t DEBUG_UARTTXD = 21;  /* Transmit Data (TXD) at P2.0 */
    static const uint8_t AUX_UARTRXD = 18;     /* Receive  Data (RXD) at P4.5 */
    static const uint8_t AUX_UARTTXD = 17;     /* Transmit Data (TXD) at P4.4 */

     and everything works fine.  

  2. I apologize if this is obvious, but on a new version of a MSP430FR5949 based datalogger programmed using Energia 18 - I switched the pins on the physical chip for serial communication from the Aux to the Debug UART for better layout.  Below is the modified pin map energia_pins.h file -

    #if defined(__MSP430_HAS_EUSCI_A0__) || defined(__MSP430_HAS_EUSCI_A1__)
    static const uint8_t DEBUG_UARTRXD = 18;  /* Receive  Data (RXD) at P2.1 */
    static const uint8_t DEBUG_UARTTXD = 17;  /* Transmit Data (TXD) at P2.0 */
    static const uint8_t AUX_UARTRXD = 22;     /* Receive  Data (RXD) at P4.5 */
    static const uint8_t AUX_UARTTXD = 21;     /* Transmit Data (TXD) at P4.4 */
    #define AUX_UART_MODULE_OFFSET 0x20
    #define SERIAL1_AVAILABLE 1

    I can't seem to even get a simple serial print out in terminal, although it loads without errors.  

    How do I specify to use the debug_uartrxd and debug_uarttxd pins?  Is there something similar to Wire.setModule() for serial?

  3. What MSP430 are you using?  SPI or I2C (just saw you tagged it I2C)?

    If you look in Adafrauit's Adafruit_BME280.cpp file under lines 374, 403, and 437 - there is the following 'if' statement,

    int32_t adc_T = read24(BME280_REGISTER_TEMPDATA);
      if (adc_T == 0x800000) // value in case temp measurement was disabled

    return NAN;

    NAN simply refers to 'not a number', and indicates typically something went wrong when reading the sensor. Adafruit's example was originally written for Arduino, so you'll have to use something similar for NAN in Energia I assume.

  4. Does anyone have any code examples, experience, or can point me to the right direction when it comes to reading/writing to the internal flash that comes with these boards in Energia? 


    I'm wanting to store up to a maximum of a days worth of non-volatile 3x32 bit 5 minute samples (3,456 bytes), before sending as packets when the Rx is in range.


    Thanks in advance!

  5. First, I'd like to say thanks for the implementation of EasyLink for the cc1310/cc1350 in Energia 18. Last year the community was invaluable in helping me develop some MSP430FR5949/BME280 dataloggers for my dissertation research.


    I'm working on a new version based off the cc1310, because well, transmitting my data wirelessly sure beats having to recover the dataloggers. I have a couple questions that I have been unable to answer - 


    1. The EMT documentation suggests that if you use delay, during compiling this is converted to a low power mode.  Is this only for the MSP430/432 variants?  


           The main reason I ask is because sleep(), sleepSeconds(), etc... do not appear to be available for the       cc1310/cc1350. Low power modes would be essential for this project.


    2. As general advice, any opinions if I would be better off using Sensor Controller Studio, TI-RTOS, CCS for the development of this project and then simplify and port functionality back to Energia?  


    As always, thanks for the help and insight.



  6. Thanks for the response but I think i may have not explained clearly what I am trying to do. 


    I have a embedded MSP430FR5949 based datalogger that I am trying to program using the MSP430FR5969 Launchpad as an ISP.  I intend on using P1.6 and P1.7 for I2C to control and read a digital temperature sensor.  I have been unable to get I2C to work on the MSP430FR5949 dataloggers but the original prototype using the MSP430FR5969 works fine. 


    I assume the issue is due to pin assignment as one of the chips has 48 pins versus 40.  I modified the energia_pins.h file for the FR5969 to get SW I2C to work on P1.6 and P1.7 instead of P3.4 and P3.5. 


    My original question was do I have to tell Energia that P1.6 and P1.7 is at physical pin location on the FR5949 chip than on the FR5969?  If so, what file do I need to modify? I don't see anything in energia_pins.h that identifies the actual physical locations of the chip pins, just the pin outs on the booster pack or Launchpad. 


    I apologize if this is unclear. 

  7. Ok, I received the boards yesterday and have soldered a few up.


    Even though the 1.6 / 1.7 I2C pins port / pins are at different physical locations on the 2 MCUs (FR5969 is 48 pin versus a FR5949 40 pin), where does this get defined in the pins.h file? 


    Basically I don't understand how the pins numbers on the MSP430 datasheet from P1.6 and P1.7 (31 and 32 respectively) translate to the numbers seen in the pins.h file like

    static const uint8_t MOSI    = 15;  /* P1.6 aka SIMO */
    static const uint8_t MISO    = 14;  /* P1.7 aka SOMI */


    Thanks in advance!

  8. Just a quick question - probably obvious but I wanna make sure before I order some boards.


    If I was using a FR5969 Launchpad as an ISP to program some FR5949 chips - will the hardware I2C pins 1.6 and 1.7 and the software defined I2C pins 3.5 and 3.6 still work even though they are at different physical locations on the chips?  My breadboard prototype version uses I2C on either set of I2C lines and works fine, but with a FR5969 and not the FR5949.  When programming another chip in a series does the pin map need to be defined in the energia_pins.h file for the FR5969? 





  9. Hey,


    I've built a little datalogger using the FR5969, TMP112, and the BME280.  I've been successful removing the jumpers and programming the stand alone loggers using ISP layout mentioned in multiple other threads on this forum. However, there are a ton of wasted I/Os and space for my application, so I've wanted to use a smaller chip.  Enter the FR5949 (ok, just a little bit smaller but every milligram counts)..


    When I try to program the new loggers, I get the following error -


    tilib: MSP430_OpenDevice: Unknown device (error = 5)
    tilib: device initialization failed


    Can you use a the launchpad to program other similar chips within a series?  Anyone have experience with this?

  10. I apologize in advance as the answer to this may be obvious, but I've looked around the forums and haven't found an answer yet. 


    I'm trying to use a Bosch BME280 sensor with a MSP430FR5969 to do some handy datalogging.  I found a library for it located here




    originally for Arduino implementation, and it works fine on that platform.  There's no obvious requests for avr based libraries etc... but where should I start in attempting to get this to work with an MSP430?

  11. Thanks so much for the help. 


    Just to avoid possible confusion I'm not intending on using an EEPROM, that was just old code from the Arduino and ATTiny24 setup.


    So I have a few more questions.  1) Do I need to specify an absolute address in with_attribute_((section(".text"))) for it know where to place the 16 bit integer from each reading from the sensor, 2) does it need have a address specified each time in the loop when it adds sensor data and 3) do I need to preallocate the total number of samples? 

  12. Sorry to bother if I'm missing something obvious in the documentation - but there's something I can't seem to figure out.


    I'm migrating a simple datalogger that uses an ATTiny24a, BMP180, and an external EEPROM to (hopefully!) take advantage of the power savings and FRAM on the MSP430FR5969.  I've attached a sample of my code by I can't seem to find anywhere similar functions to EEPROM.read and EEPROM.write.  All I've managed to find is FRAM_write<enter # of bits here> in the fram.c in the DriverLib library.



    Simple code to transmit ID and basic sensor data using OOK
    #include <EEPROM.h>

    int pulse = 50;               //transmit pulse length
    int interval = 25;            //interpulse length
    int sample = 5000;            //time between sensor sampling
    int gap = 500;               //time between transmissions
    int idArray[] = {1,0,1,1};    //basic tag ID in binary, e.g. 11 = {1,0,1,1}
    int addr = 0;                 //initial EEPROM write address
    int address = 0;              //initial EEPROM read address

    void setup() {
      // initialize digital pin 13 as an output.
      pinMode(13, OUTPUT);

    void loop() {
    //DATA_COLLECTION AND EEPROM WRITE/READ________________________________________________________________
    int sensorData = random(1024);  // this is the BMP180 data but now it's just random junk for testing
      if (addr <= 9){
      EEPROM.write(addr, sensorData);
        addr = addr + 1;
      if (addr > 9){
        int sensorTransmit = EEPROM.read(address);
          for (int j=0; j<4; j++){
            if (idArray[j] == 1){
              digitalWrite(13, HIGH);   
              digitalWrite(13, LOW);    
          for (int k=0; k<8; k++){
            digitalWrite(13, bitRead(sensorTransmit, k));                 
              digitalWrite(13, LOW);
                byte state = bitRead(sensorTransmit,k);
            digitalWrite(13, LOW);  
                address = address + 1;
        if (address > 9){
          address = 0;
          addr = 0;



    Basically all I'm trying to do is log data to the FRAM at a specified interval, then after a certain number of datalogging events read it back out and convert to on-off keying.  Each datalogger has it's own unqiue ID. At a later time I want to look into the different lower power modes on the MSP430, but first things first. 


    Again, I apologize if I'm overlooking something quite simple. 

  • Create New...