Jump to content

energia

Members
  • Content Count

    1,235
  • Joined

  • Last visited

  • Days Won

    60

Everything posted by energia

  1. Your main Sketch tab should look like: extern "C" void foo(); void setup() { bsl(); } void loop() { } Then create another tab called bsl.c and add the following content to it: #include <stdint.h> #define BSL_PARAM 0xFC48FFFF // I2C slave address = 0x48, Interface selection = Auto #define BSL_API_TABLE_ADDR 0x00202000 // Address of BSL API table #define BSL_ENTRY_FUNCTION (*((uint32_t *)BSL_API_TABLE_ADDR)) void foo() { ((void (*)())BSL_ENTRY_FUNCTION)((uint32_t)BSL_PARAM); // Call the BSL with given BSL parameters } This compiles but I have never used the BSL function in Energia. Robert
  2. energia

    CC1312R1 Energia

    Not yet but will be soon.
  3. energia

    i2C Slave not working on MSP430FR5969

    The MSP430 Wire buffer length is set to 16. If you need a larger buffer, you can edit the file: Linux: <Energia directory>hardware/energia/msp430/libraries/Wire/Wire.h Windows: <Energia directory>hardware\energia\msp430\libraries\Wire\Wire.h macOS: <Energia.app directory>/Contents/Java/hardware/energia/msp430/libraries/Wire/Wire.h and in: Linux: <Energia directory>hardware/energia/msp430/libraries/Wire/utility/twi.h Windows: <Energia directory>hardware\energia\msp430\libraries\Wire\utility\twi.h macOS: <Energia.app directory>/Contents/Java/hardware/energia/msp430/libraries/Wire/utility/twi.h And set BUFFER_LENGTH / TWI_BUFFER_LENGTH to a larger number.
  4. energia

    MSP430FR2355 problem to connect with nRF24L01+

    You are right, there is indeed something wrong with SPI. The pins and registers are setup wrong in the SPI library due to incorrect pins in the MSP430FR2355 pins_energia.h header file. Please copy the attached pins_energia.h to the MSP-EXP430FR2355LP variants directory. Windows: <Energia dir>\hardware\energia\msp430\variants\MSP-EXP430FR2355LP Linux: <Energia dir>/hardware/energia/msp430/variants/MSP-EXP430FR2355LP macOS: Energia.app/Contents/Java/hardware/energia/msp430/variants/MSP-EXP430FR2355LP Please let us know if this solved your issue. Robert pins_energia.h
  5. energia

    energia serial monitor not working

    I just now gave this a try with a DS18B20 and it works as expected (see output below). If you applied 5v then pin 10 might now be damaged. I did try with 5v supply knowing I could damage the MSP430 but that worked as well. Try connecting it to pin 6 (P1.4). Also make sure that you change that in your Sketch. It is also unclear to me from the pictures if you have a 4.7k pullup resistor on the data line (middle pin). If you do not, then that's a requirement for it to operate correctly. Also, the LaunchPad should have 2 Serial ports exposed. Make sure you select the right one. ROM = 28 FF 6C 5C 72 15 3 E3 Chip = DS18B20 Data = 1 7C 1 4B 46 7F FF C 10 7F CRC=7F Temperature = 23.75 Celsius, 74.75 Fahrenheit No more addresses. Robert
  6. energia

    energia serial monitor not working

    "No more addresses." means it can't find the sensor. Also, it seems that you wired the sensor to 5v. Note that the MSP430 I/O's are _not_ 5v tolerant. The sensor might have put 5 volt on the line damaging the I/O. Also, if the sensor module you are using is a 5v one, it might not detect the 3.3v signal levers the MSP430 put's out. Do you have a link to the DS18X20 module you are using?
  7. energia

    I2C- MSP-EXP430G2ET

    P2.1 and P2.2 are S/W I2C slave (module -1) and does not support I2C Slave. In your Sketch you call Wire.setModule(0) to select hardware I2C. However, looking at the picture you wired the 2 LaunchPad's together on P2.1/P2.2. This is not correct, the hardware I2C module is on P1.7(SDA) and P1.6(SCL). Rewire it to use those pins and that should solve the issue.
  8. energia

    i2C Slave not working on MSP430FR5969

    p.s. you should use the first Sketch you posted. Also make sure that the master is setup to talk to the right address you specify in the Wire.begin(addr) call.
  9. energia

    i2C Slave not working on MSP430FR5969

    There is a bug for slave mode which has already been fixed in the git repo. You can work-around it with the following. If you have the latest Energia release installed (1.8.7E21), then edit the file: Linux: <Energia directory>hardware/energia/msp430/libraries/Wire/utility/twi.c Windows: <Energia directory>hardware\energia\msp430\libraries\Wire\utility\twi.c macOS: <Energia.app directory>/Contents/Java/hardware/energia/msp430/libraries/Wire/utility/twi.c Got to line 1183 and replace: 1183 } else if (twi_state == TWI_MRX) { // Master receive mode 1184 // copy data to output register 1185 UCBzTXBUF = twi_txBuffer[twi_txBufferIndex++]; by this: 1183 } else if (twi_state == TWI_STX) { // Slave transmit mode 1184 // copy data to output register 1185 UCBzTXBUF = twi_txBuffer[twi_txBufferIndex++];
  10. energia

    How to program "raw" CC1330 chip?

    Which ISP programmer do you have? If it's compatible with CC1310 then we should be able to figure something out.
  11. energia

    How to program "raw" CC1330 chip?

    Interesting. I did not know about these modules. Thank you for bringing this to my attention. Which module do you have (frequency)? These module are intended to be used as a network processor connected to an MCU. Looking at the user manual there is no serial loader implemented nor a way to update the firmware over the air. With that said, it seems that the modules expose the TCKC, TMSC and RESET line. You should be able to hookup these lines from the LaunchPad's XDS110 if you have one to program it with Energia. Please not that there are pin mappings specific for the LaunchPad that you might want to change.
  12. Hi all, We have been working on low power modes for the CC3200 and need your input on the API's. The CC3200 power management system is quite complicated and has many combinations. I think there are only a couple of interest though since those will give the lowest power. Details can be found in the CC3200 Power Management Application note. The most interesting mode is LPDS and the combination of being disconnected from the network and the option to keep connected to the network. 1: LDPS always connected. In this use case the MCU will go into LPDS but the radio will keep a connection with the WiFi Access Point but is idle. In this case the system will consume about 700 uA when in LPDS. When the system comes out of LDPS you will immediately be able to start communicating with the network. 2: LDPS for both MCU and radio. The radio will disconnect from WiFi. I this case the system will consume about 130 uA. The the system comes back up the radio will need to re-connect to the AP before network traffic can start. The cool thing for this use case is that you can choose not to connect to WiFi when you come out of LDPS. This gives you the option to collect e.g. sensor data when you wakeup and then only connect to the AP when you are ready to send out over the network. 3: Hibernate. I have not yet looked at this. We already have sleep()/sleepSeconds() and suspend() API's for MSP430 and skeleton implementations of those for the CC3200 that don't do much right now. I would like to reuse those and fit the above 2 into these API's. Question: 1: Would you like to see other power modes implemented? 2: How would you like to see the "stay connected" vs "disconnect" during LPDS brought out as options?
  13. The key here is to as @LiviuM mentioned to assign a unique client ID to each MQTT client. I have just confirmed that with 2 different client ID's all works as expected.
  14. energia

    Add MSP432 support to Arduino?

    Although the Arduino IDE should be able to consume the Energia packages, there is a difference between the arduino-builder in Arduino and Energia which makes the msp432 package incompatible with the Arduino IDE. See the pull request here: https://github.com/arduino/arduino-builder/pull/119. I have it on my list to find a different solution and be able to use the stock arduino-builder at which point the Arduino IDE should be able to consume the Energia package. For TivaC and MSP430, it is possible to use it in the Arduino IDE. Just put this in the preferences: http://energia.nu/packages/package_energia_index.json. Then pull up the board manager and install TivaC support.
  15. Can you please open a terminal and type the following command? kextstat -b com.FTDI.driver.FTDIUSBSerialDriver If it does not show something like the below then the driver was not loaded: Index Refs Address Size Wired Name (Version) UUID <Linked Against> 533 0 0xffffff7f831ad000 0x7000 0x7000 com.FTDI.driver.FTDIUSBSerialDriver (2.3) ECC3AF36-431D-370D-86F2-5237785E9CF8 <110 52 5 4 3 1> In that case try: find /Library/Extensions/ -name *FTDI* This should show something like the below if the driver was installed. If not then reinstall the driver. If it does show something like the below then read on. /Library/Extensions//FTDIUSBSerialDriver.kext /Library/Extensions//FTDIUSBSerialDriver.kext/Contents/MacOS/FTDIUSBSerialDriver If the driver is indeed installed and exists in /Library/Extensions then try to force load it with the following command and check id the Serial port shows up in Energia. sudo kextload -b com.FTDI.driver.FTDIUSBSerialDriver After this you can check if the driver is loaded with the command I listed above.
  16. Can you please provide details on what you see? What does ls /dev/tty.* show?
  17. energia

    Sleep frequency - 999ms vs. 1000ms

    Which version of the msp430 package are you running? I don't have access to a MSP430FR2433 LaunchPad right now so ma not able to reproduce. Could you try replacing the setup loop with jus a pinMode(LED, OUPUT) to test if it you do see a 2 second blink?
  18. energia

    i2c communication not working on msp430fr5969 rev 2.0

    I spaced out on this. Tank you to one of the developers for reminding me. The msp430fr5969 does not have hardware I2C on pins 9/10 and thus no I2C slave on those pins, only software master. It does however have both hardware slave/master on pins 14(SCL)/15(SDA). This module can be activated by calling Wire.setModule(0) before Wire.begin(). Please see Sketch below as an example: #include <Wire.h> void setup() { Wire.setModule(0); Wire.begin(4); // join i2c bus with address #4 Wire.onReceive(receiveEvent); // register event Serial.begin(115200); // start serial for output } void loop() { delay(100); } void receiveEvent(int howMany) { while(1 < Wire.available()) // loop through all but the last { char c = Wire.read(); // receive byte as a character Serial.print(c); // print the character } int x = Wire.read(); // receive byte as an integer Serial.println(x); // print the integer }
  19. energia

    i2c communication not working on msp430fr5969 rev 2.0

    I just ran a test here and I2C slave indeed does have some issues on the FR5969. We will look into it. Robert
  20. energia

    i2c communication not working on msp430fr5969 rev 2.0

    Please provide both the Sketch you run on the Uno and the msp430fr5969 so I can look into it.
  21. energia

    MSP432P401R: example/library for gps

    That library should work with Energia/msp432 from looking at it .
  22. energia

    MSP432 Error compiling to board

    I reproduced the issue. Below is how to work around it. open the folder %LOCALAPPDATA%\Energia15\packages\energia\hardware\msp432e\5.19.0 Open the file platform.txt in a text editor. find the line recipe.hooks.linking.postlink.1.pattern.windows=cmd /c copy "{build.system.path}/energia/energia_pm4fg.rov.xs" "{build.path}" an delete it. You should now be able to compile. Robert
  23. energia

    MSP430 Board Definitions 1.0.5 Breaks Serial

    Which MSP430 board are you using.
  24. Currently we do not have the internal temperature sensor ADC channel exposed but I think it is a good idea to get that enabled. Would you please be so kind to submit a feature request here? https://github.com/energia/msp432r-core/issues Thanks, Robert
  25. energia

    G2553 UART issues

    Couple questions: Was this always the case or did it function correctly at some point? Which version of the Energia IDE and which version of the MSP430 packages do you have installed? Can you post the Sketch you have used to send data? Robert
×