Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by energia

  1. You are using Energia API's mixed with setting registers. Energia API's assume exclusive access to registers without user interference. We can however make this work with one small modification to wiring_analog.c In wiring_analog.c on line 61 just under the first if defined(__MSP430_HAS_ADC12_B__) change #define REF_MAP(x) (x & 0x31) to #define REF_MAP(x) (x & 0x33). You can find the msp430 core in: Linux: ~/.energia15/packages/energia/hardware/ Windows: %LOCALAPPDATA%\Energia15\packages\energia\hardware\ macOS: ~/Library/Energia15/packages/energia/hardware/ wiring_analog.c is under cores/msp430/ Then use the Sketch below. #define MY_INTERNAL2V0 (ADC12VRSEL_1 | REFON | REFVSEL_0 | REFOUT) #define ANALOG_RES 12 void setup() { analogReadResolution(ANALOG_RES); analogReference(MY_INTERNAL2V0); Serial.begin(115200); } void loop() { int val = analogRead(A11); /* * Note that the default resolution for the FR6989 is 12 bit. * This can be changed with analogReadResolution(resolution in bits) */ float voltage = val * (1.2 / (1 << ANALOG_RES)); Serial.print(voltage * 1000); Serial.println(" mV"); delay(500); }
  2. analogRead() will overwrite whatever you have written into REFCTL0 and therefor you are getting 0 as the REFOUT bit is not set. To work-around this do the following: `#define MY_INTERNAL2V0 (ADC12VRSEL_1 | REFON | REFVSEL_0 | REFOUT)` Then in setup call analogReference(MY_INTERNAL2V0) in setup() and do not call your function Vref_ON().
  3. You are right about the offset. It needs to be 0x20. Please github issue here: https://github.com/energia/msp430-lg-core/issues/65. Same for the I2C module. This is indeed also an error in the pins file.
  4. There are no issues with the variant's pins_energia.h. There is an "issues" or rather limitation on which ports attachInterrupt() can be called on. Right now that limitation is P1 through P4. The MSP430FR5994 does have interrupt capability on all ports and to be able to support this the underlying code needs to be changed. The implementation is in the file WInterrupt.c. I have filed an enhancement request here: https://github.com/energia/msp430-lg-core/issues/64. For the Serial1 question, this smells like a bug. Would you please be so kind to file a bug here: https://github.com/energia/msp430-lg-core/issues
  5. There are no errors, only warnings so the compilation was successful and you can upload the binary produces using the "Upload" button. It seems that you do not have the correct driver installed though. Please install the driver from here and read the instructions: http://energia.nu/guide/guide_windows/ The direct link to the driver is: http://energia.nu/files/ezFET-Lite.zip Robert
  6. I just now put the correct driver back on energia.nu. It got misplaced when moving things around. http://energia.nu/files/MSP430LPCDC-1.0.3b-Signed.zip Please install this driver as it is signed (the one on github is not). Unsigned drivers will not load in later versions of macOS which is probably the reason why you do not see any serial ports related to the LaunchPad.
  7. Assuming you have I2C connected to pins 14 and 15, add Wire.setModule(0) before bme.begin(); Robert
  8. Welcome to 43oh @Binhthanh Which MSP430 LaunchPad are you using and where did the library come from? Robert
  9. Couple quesitons: You mentioned "I reorient the jumpers TXD and RXD.". In what way did you reorient them? If you are indeed using the MSP430FR6989 LaunchPad then you do _not_ need to change the jumpers. Are you sure about the COM port number? What version of the MSP430 core do you have installed. Make sure you update to the latest (1.0.3) using the Energia boards manager.
  10. The package might not have installed properly. Can you please try uninstalling by following the steps in this thread:
  11. p.s. see pinmap here: http://energia.nu/pin-maps/guide_msp430g2launchpad/
  12. My guess is that there are some timing changes between the 2 versions of Energia. I'll look into it. For I2C, please note that to accommodate the "new" BoosterPack standard which puts I2C on pins 9 and 10, we implemented a software based I2C interface since some of the MSP430's do not have I2C brought out to pins 9/10. To use the legacy pins which puts hardware I2C on pins 14/15 in your Sketch before Wire.begin() call Wire.setModule(0).
  13. Without the Sketch / library there is little we can do to help other than guess. Please attach the Sketch / Library you are using with a detailed description of what hardware you are using and how it is connected.
  14. This code is the loop code from Energia's main(). init() set's up the chip, setup() is your setup() in the Sketch and then finally loop() is the loop code in your Sketch. It will indeed loop forever calling SerialEventRun() and your loop(). If you do not have a SerialEvent installed by implementing void serialEvent() in your Sketch then it won't be called. As @NurseBob mentioned, what is in your setup() and loop() code. Is it really stuck in setup() or is it halting within the for(;;){} piece of code.
  15. This is due to the code trying to detect if a 32.768 kHz crystal is present. This is done so that the power management code can use the optimal clock source during sleep to get the lowest power. With that said, I have never seen more than a few seconds delay. You can turn detection off by commenting out some lines in the core. Instructions below: Make sure you upgrade the core to the latest (1.0.3) using the Energia boards manager (Tools->Board->Boards manager). To avoid the delay in startup put the following at the bottom of your Sketch: #ifdef __cplusplus extern "C" { #endif void enableXtal() { // avoid startup delay } #ifdef __cplusplus } #endif This avoids the crystal startup code from being called and instead your version of it is called which does nothing in this case.
  16. With the example Sketch "SoftwareSerialExample" loaded on both MSP2553's it works correctly when connecting them P1_4<->P1_3 and P1_3<->P1_4. Make sure that you set the baudrate to 9600. The 2553 can not handle faster baudrate's for Software Serial. Also after programming them and wiring them up, reset both of them using the reset button.
  17. Just a wild guess. Is the port you are plugging it into a USB 3.0 port? It probably is not the issue but can you connect it to a USB 2.0 port? A USB 3.0 has a blue lip and a USB 2.0 has a gray or black lip. Robert
  18. There is indeed something wrong with package_index.json. Can you please do the following? Close Energia Type "file explorer" in the "Search Window" This will bring up a file explorer window. Paste "%LOCALAPPDATA%\Energia15\" into the location bar. You should see something like this. Drag package_index.json and package_index.json.sig to the Desktop. Attach them to this thread so that I can have a look at them. The action in step 4 should have moved the 2 files and they should no longer exist in the directory mentioned in step 2. Now delete both the directories "packages" and "staging". This will force removal of all Energia packages. Now reopen Energia and go to Tools->Board->Boards Manager. This will download a fresh copy of package_index.json and package_index.json.sig. Install the package "Energia MSP432 EMT RED Boards" Open the Blink example under File->Examples->01.Basics->Blink. Click the Upload button. Please report back on what results you are getting after these steps. Robert
  19. Do you still have diskspace left? Depending on your PC's configuration it can take a while for the package to install. When you say it's stuck, how long did you wait until you determined that it was stuck.
  20. Let's do some sanity checks on the chip itself. Does the RED LED blink when you upload the Sketch File->Examples->01.Basics->Blink? Make sure you install the jumper next to the LED. Robert
  21. I just now uninstalled the drivers I had and reinstalled the ones from energia.nu and the work OK. Are you an administrator on your machine? Can you try installing the drivers as Administrator? Right click DPInst64.exe and choose "Run as administrator". Also, did you get any errors or permission messages when you installed the drivers the first time around. Roberts
  22. I can't think of anything else that might be wrong. I am not able to reproduce it here and thus hard for me to debug this.
  23. That is indeed not what it needs to be. Which version of the MSP430 core do you have installed? (Check tools->Boards->Boards Manager...). Is the sensor on a breakout board or is it a bare sensor? Check to make sure that the pullup is correctly installed by measuring the voltage on the signal pin. If you have access to a scope then check if there is a signal on the signal pin.
  24. As you noted, there is something going wrong with the port assignment in Windows. It could be that all comports somehow have been assigned already and Windows is not giving them up to other devices. What does the Driver tab say in the device manager? Mine looks like the following. Where did the driver you installed come from? Did you download it from energia.nu? Have you tried rebooting windows?
  • Create New...