energia

Members
  • Content count

    1,109
  • Joined

  • Last visited

  • Days Won

    47

energia last won the day on July 18

energia had the most liked content!

About energia

  • Rank
    Level 4

Contact Methods

  • Website URL
    http://www.energia.nu
  1. Which LaunchPad are you using? Note that not all Serial ports will show with the same name on all boards. The example shows a port name just for illustration purposes.
  2. Correct. F_CPU configuration in boards.txt defines the clock speed the MSP430 runs at. With that said, reducing the clock speed to 8 MHz is probably not going to do much in term s of power consumption. In your Sketch try calling sleep() or sleepSeconds() instead of delay. This will put the MSP430 in it's lowers power mode. Also make sure that you are not driving any LED's etc that consume considerable power. Also for optimal power set al unused I/O's to OUTPUT HIGH in setup using pinMode(). Do this unless it is driving an LED or some other enable pin that turns on a high power consumer peripheral of course. Robert
  3. Please see the BoosterPack pinout here: http://energia.nu/pin-maps/guide_msp430g2launchpad/ PIN 4 is the TX of the Serial on the G2553. Hence your Serial stops working if you utilize this as a digital input. You have a small mistake in the Sketch. You set pin 4 as output yet you do a digitalRead() in loop. Set the pin to pinMode(x, INPUT) (replace x with a pin number) in setup(). Use a pin other than 3/4 e.g. 6. I would advice to set the input as INPUT_PULLUP e.g. pinMode(6, INPUT_PULLUP) to utilize the internal PULLUP resistor and remove the external PULLDOWN resistor. Robert
  4. hmm, it should not matter if there are multiple AP's with the same SSID. The CC3200 associates with the one with the strongest RSSI and will from thereon negotiate an IP address just as if there was only one AP. Curious if the AP only hands out IP addresses to know stations and rejects others. Either way, I have not seen this issue before. Your network admin will be able to look at the log of the DHCP server and from there on figure out what is going wrong.
  5. If you connect to that network with your PC, does your PC acquire an IP address? The reason that you are seeing 3 of them in the Serial terminal is that there are in fact 3 AP's with the SSID "forth public access". The CC3200 will list all AP's whereas your PC will only show it as one. Robert
  6. Happy to hear you got it working and thanks for reporting back.
  7. I am actually looking into this CCS issue right now. This issue will be fixed with a new msp432r-core update early next month. Below is how to work-around it with the current core: Assuming you know where to find the msp432r core on your system. Replace the existing boards.txt file with the one attached. Edit msp432r/4.9.1/cores/msp432/ti/runtime/wiring/WMath.cpp and comment out: // extern long random(void); // extern void srandom(unsigned long __seed); Rename msp432r/4.9.1/cores/msp432/ti/runtime/wiring/msp432/wiring_analog.c to msp432r/4.9.1/cores/msp432/ti/runtime/wiring/msp432/wiring_analog_msp432.c Delete msp432r/4.9.1/cores/msp432/ti/runtime/wiring/random.c You might have to delete any existing MSP432 cores from the CCS project explorer. When doing so, make sure that you tick the box in the remove dialog to remove it from disk. Reimport your Sketch into CCS. You might have to remove your existing project so that CCS does not complain about it already existing. Robert boards.txt
  8. Unfortunately this is a know issue and there is currently no work-around for it. It will be fixed in CCS 7.3.
  9. Thanks for the detailed report. I am not sure if I can relate any of these to the way we have implemented analogRead() since it is pretty straight forward and pretty much copies how the ADC driverlib examples configure the ADC. Of course, we could have a bug somewhere that I missed during review/testing. If you have a simple example Sketches that I can use to reproduce issues, then please attach them and I'll look into them. One thing to note is that to be "Arduino compatible" we have set the default ADC resolution to 10 bits as per Arduino API specification (https://www.arduino.cc/en/Reference/AnalogRead). We do set the resolution of the conversion to 14 bit and then shift the result to be 10 bits. You can change the "shift" and therefor the resolution of what analogRead() returns by calling analogReadResolution() e.g. analogReadResolution(14) to have analogRead() return the full 14 bit result. Hope this helps. Robert
  10. Thank you for the feedback! I just realized that this entire page is quite out of date and needs to be updated. Robert
  11. What is the oddness that you were seeing that led you to this investigation? The datasheet indeed states that the ADC14CLK should not exceed 25 MHz. With that knowledge, the implementation of analogWrite() is indeed wrong. Instead it should be set to ADC_CLOCKSOURCE_ADCOSC which is MODCLK with a 25-MHz typical frequency. With that said, the msp432r core (which is for the RED LaunchPad only) uses the TI-RTOS ADC driver. That driver sets it to ADC_CLOCKSOURCE_ADCOSC/1/1 correctly. I will look into getting a fix out for the legacy msp432 core. To solve your issue, the question is if you have a RED or BLACK board. If you have a RED board, then I would advice to get the MSP432 EMT RED Board package using the board manager. If you have the BLACK board then I advice to work-around it until the update is release by replacing ADC_CLOCKSOURCE_MCLK with ADC_CLOCKSOURCE_ADCOSC. Robert
  12. Please also see the comment here I posted here on github here: https://github.com/energia/Energia/issues/569#issuecomment-316120507 Copy of that post: "VLO has a typical frequency of 12kHz hence this is the value used in the code for vlo_freq. With that said, VLO, as per datasheet, has a minimal value of 4kHz and a maximum value of 20kHz. The frequency it settles on varies by part, temperature, power supply, etc. Hence it can end up anywhere between 4 kHz and 20 kHz. Unfortunately there is no way to measure the VLO Freq. on startup. If you would like accurate sleep times then I suggest that you install the 32kHz watch crystal that came with the LaunchPad in the box. Also see this thread for additional information about the sleep() and sleepSeconds() implementation: http://forum.43oh.com/topic/4571-building-low-power-into-energia/?page=2#comment-46495"
  13. I would suggest to create your own variant in the variant directory. Then add that variant to board.txt which will make it available in the Energia boards menu. Be carful with directly modifying the core. If you install a core update through the board manager, you will loose all your modifications. A better way but more complex would be to create your own installable light weight package. Here is an example of a lightweight TivaC package that I put together a while ago. The downside is that you will have to be able to host the .json file somewhere so that you can point Energia to it in the preferences->Additional Boards Manager URLs. http://energia.nu/packages/package_wrigley_index.json Robert
  14. Thanks @Clavier for the explanation.To add to this. The VLO is only used if the startup code does not detect an external crystal to source ACLK from. @tapasxplore Note that the MSP430 max VCC is rated @ 3.6. Robert
  15. Below is a guide to get up and running with Energia BLE / Evothings Evothings for controlling your LaunchPad over BLE with a custom app on your mobile device: I have put together an app that allows to control of the RGB LED and Buttons exposed in the BLEInputOutput Sketch running on the MSP432 LaunchPad. At this moment it only runs on an MSP432 LaunchPad. Other LaunchPad's have bot been tested. To run the APP and control the LaunchPad follow the instructions below. You might have to upgrade the BoosterPack’s firmware. The firmware on my BoosterPack was not the right one so yours might not be as well. If you have issues running the app, then refer to updating the BoosterPack section below. Below is a screenshot of the app that I put together using Evothings to control the BLEInputOutput Sketch running on iOS. Running the APP on your mobile device: 1: Seat the CC2650 BoosterPack on the MSP432 LaunchPad 2: You will need the latest BLE library for crucial updates and new example Sketches. Get it from: https://github.com/ti-simplelink/ble_energia 3: Put the BLE folder in your person Energia/libraries directory just as you would install any other library. 4: Run Energia and open the example BLE->BLEInputOutput Sketch. 5: Verify and upload the Sketch 4: On your phone, download the Evothings Viewer from the app store. There is one for iOS and Android. 5: Open the app and then in the “Enter connect key” enter http://energia.nu/ble/bleinputoutput/ 6: Click connect. 7: The Energia BLE app should now open in the viewer. 8: Click he start button and the status should change to “Status: Connected” 9: You can now change the RGB sliders and you should see the LED’s on the LP match 10: Pressing the buttons will change the text for each button from “released” to “pressed”. Upgrading the CC2650 BoosterPack: The firmware on your BoosterPack might not be the right one. If you are experiencing issues with running the app, you might have to upgrade the firmware on your CC2650 BoosterPack. We are working on making this cross platform and to accomplish for Energia users. For now Smart RF Flash Programmer 2 has to be used on a windows PC. 1: Download Smart RF Flash Programmer 2 2: Remove JTAG headers from MSP432 LP (TDI, TDO, TCK, TMS) 3: Remove the BoosterPack from the LaunchPad (you will need a RED MSP432 LaunchPad) 4: Attach 10 pin ARM ribbon cable (included in the BoosterPack box) to XDS110 header on the emulation side of the MSP432 LaunchPad. Attach other end to CC2650 BP. It is keyed so there is only one way to attach it. 5: Get the SNP images from this link: http://software-dl.ti.com/dsps/forms/self_cert_export.html?prod_no=ble_2_02_simple_np_setup.exe&ref_url=http://software-dl.ti.com/lprf/BLE-Simple-Network-Processor-Hex-Files 6: Once installed, find the image simple_np_cc2650bp_uart_pm_xsbl.hex 7: Plug the LP into your computer. 8: Launch Smart RF Flash Programmer 2. 9: The CC2650 should show up in the left pane titled “Connected Devices” 10: Right click the CC2650 and select connect. The status bar should say “Success!” when finished connecting. 11: On the “Main” tab, in the “Flash Image” field select single and then browse to the simple_np_cc2650bp_uart_pm_xsbl.hex image. 12: Still on the main tab, under the header “Actions” check “Erase”, “Program” and “Verify”. 13: Then click the Green Arrow image on the right bottom to program the image. 14: Remove the ribbon cable, replace the JTAG headers and reseat the BoosterPack. You are now good to go to run the Sketch/App.