Jump to content
43oh

Marc

Members
  • Content Count

    38
  • Joined

  • Last visited

  • Days Won

    2

Reputation Activity

  1. Like
    Marc reacted to energia in Energia 1.6.10E18 Libraries   
    It will look at \AppData\Local\Energia15\packages\energia\hardware\msp430\1.0.2\libraries as this is a newer version of the core. The "..\energia-1.6.10E18\hardware\energia\msp430\libraries" is the location of the core version 1.0.0 that comes with the IDE.
    I am not sure what you mean with "an older library instead of the new folders that come with the new zipped file"
    Can you please elaborate?
  2. Like
    Marc reacted to Rickta59 in Changing the main.cpp   
    Just create a new tab and call it main.c
     

     
     
  3. Like
    Marc reacted to energia in Energia 18 and msp430FR5739 experimenter board   
    Please see the work-around for this in this thread: http://forum.43oh.com/topic/9848-energia-1610r18-windows-7-launchpad-msp430g2553-dont-load-sketch/?p=74156
  4. Like
    Marc got a reaction from Rei Vilo in [Energia Library] ZigBee   
    I just packaged Anaren's ZigBee interface firmware for their A2530 module into an Energia Library. For those interested check out: https://github.com/mweintra/ZigBee
     
    It is compatible with most launchpads (see https://github.com/mweintra/ZigBee/wiki). Basic tutorials and examples are provided, I am still working on the reference documentation.
  5. Like
    Marc got a reaction from NurseBob in OPT3001 and MSP430   
    Yes, another issue with the OPT3001.cpp (or is it?) is that instead of using the calculation methods of the datasheet, they use a shortcut using bit shifting to approximate the exponent multiplication constant. This is probably to keep the data as a uint32_t instead of a float.
     
    To get the exact data as the OPT3001EVM, I replaced the opt3001::readResult() function on 146 of OPT3001.cpp (and the prototype in OPT3001.h to a float) to:
     
    float opt3001::readResult() { uint16_t exponent = 0; float result = 0; int16_t raw; raw = readRegister(RESULT_REG);   /*Convert to LUX*/ //extract result & exponent data from raw readings result = raw&0x0FFF; exponent = (raw>>12)&0x000F;   //convert raw readings to LUX switch(exponent){ case 0: //*0.015625 result = result*0.01; break; case 1: //*0.03125 result = result*0.02; break; case 2: //*0.0625 result = result*0.04; break; case 3: //*0.125 result = result*0.08; break; case 4: //*0.25 result = result*0.16; break; case 5: //*0.5 result = result*0.32; break; case 6: result = result*0.64; break; case 7: //*2 result = result*1.28; break; case 8: //*4 result = result*2.56; break; case 9: //*8 result = result*5.12; break; case 10: //*16 result = result*10.24; break; case 11: //*32 result = result*20.48; break; default: result = 0; }   return result;   }
  6. Like
    Marc reacted to Rei Vilo in OPT3001 and MSP430   
    Are you referring to this library at SensorsWeather_Library? 
     
    It works fine on my CC3200 LaunchPad.
  7. Like
    Marc got a reaction from Rei Vilo in OPT3001 and MSP430   
    I know how you feel @@NurseBob, wow nursing instructor at day, developer at night?
     
    Thanks @@Rei Vilo, I downloaded the SensorsWeather_Library and hooked up my sensor to the CC3200 launchpad. It works without glitches now!
    There is still a NAK at the end of the wire transmission, but the CC3200 seems to have no problem getting the correct value.
    I am more convinced that it is some timing issue with the energia wire implementation.
  8. Like
    Marc reacted to NurseBob in OPT3001 and MSP430   
    Marc,
     
    I wish I could be a better resource. From your description of "side by side" I'm guessing you have both an EVM and a pcb-mounted 3001?  I'm aware the EVM has a set of "test pads" and the ALS can be disconnected from the USB interface.  Have you tried the same experiment using the EVM's sensor connected to the LP?  That may be a route to tracking down where the errant data is being originated.  My one minor complaint with the EVM  is there's a bit of magic going on in the UI, which hides the code its executing, so there's no "Oh, I see, they're doing 'x' and I'm not..."
    I was just experimenting with the EVM and trying to see what I could hack via its HID interface, but no luck there, and I don't have the time right now to hook up a logic analyzer to see the communication between their UI and the ALS.
     
    Bob
  9. Like
    Marc reacted to Rei Vilo in OPT3001 and MSP430   
    There might be a library for Energia. Search for the Educational BoosterPack MK-II.
  10. Like
    Marc reacted to dubnet in OPT3001 and MSP430   
    Although it may be something else, one thing you may want to try is lowering the SCL and SDA resistors down to 2-5K.  Depending on your bus capacitance, 10K resistors may not be strong enough pull ups.
  11. Like
    Marc reacted to NurseBob in OPT3001 and MSP430   
    While not actively working with the opt3001 yet (it's a component in a design I'm working with), I also have spent more than a little time reading the docs.  What caught my attention is in section 7.4.1 of the specs (sbos681b.pdf):
    "If the measurement exceeds the full-scale range, resulting from a fast increasing optical transient event, the
    current measurement is aborted. This invalid measurement is not reported. A 10-ms measurement is taken to
    assess and properly reset the full-scale range. Then, a new measurement is taken with this proper full-scale
    range. Therefore, during a fast increasing optical transient in this mode, a measurement can possibly take longer
    to complete and report than indicated by the configuration register conversion time field (CT)."
     
    The question is: What is "fast" in regards to "optical transient" and how long is "longer" regarding measurement time? I see you're using a 100ms timing for your reads, but I wonder if the docs are suggesting that you could still be requesting data before a valid conversion has completed?
    Further, the device has two "conversion time" modes: 100ms and 800ms, and nothing in between. 
     
    Have you tried working with the 800ms mode? I don't know your requirements, but the 3001 needs time in lower light situations to gather enough photons and then calculate a result. 
    Are you checking the "Conversion ready field" (pg. 22, table 11) before reading the result?
     
    HTH
    Bob
  12. Like
    Marc got a reaction from abecedarian in msp430fr5969 pins   
    Thanks for the confirmation!
  13. Like
    Marc reacted to Rei Vilo in msp430fr5969 pins   
    Good catch and thank you for noticing me!
     
    I've checked against the pins_energia.h file.
    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 */ Release 2.3 will include the fix. 
  14. Like
    Marc got a reaction from tripwire in msp430fr5969 pins   
    Thanks! If you look on page 6 of that user guide:
     
    P2.1/TB0.0/UCA0RXD/UCA0SOMI/TB0.0
    P2.0/TB0.6/UCA0TXD/UCA0SIMO/TB0CLK/ACLK
     
    These don't match the description in: http://energia.nu/wordpress/wp-content/uploads/2014/06/MSP430FR5969.jpeg
    Also if you compare that with pins P2.5 and P2.6 TXD(1) and RXD(1) the two are consistent, so it's not a convention issue.
     
    I can verify this when my new launchpad arrives, but it would be great to find out before then. I appreciate any available help!
  15. Like
    Marc reacted to jazz in Programming Custom Tiva C hardware   
    http://processors.wiki.ti.com/index.php/Stellaris_LM4F120_LaunchPad_Debug_How_To
  16. Like
    Marc got a reaction from bluehash in [Energia Library] ZigBee   
    I just packaged Anaren's ZigBee interface firmware for their A2530 module into an Energia Library. For those interested check out: https://github.com/mweintra/ZigBee
     
    It is compatible with most launchpads (see https://github.com/mweintra/ZigBee/wiki). Basic tutorials and examples are provided, I am still working on the reference documentation.
  17. Like
    Marc got a reaction from Automate in [Energia Library] ZigBee   
    I just packaged Anaren's ZigBee interface firmware for their A2530 module into an Energia Library. For those interested check out: https://github.com/mweintra/ZigBee
     
    It is compatible with most launchpads (see https://github.com/mweintra/ZigBee/wiki). Basic tutorials and examples are provided, I am still working on the reference documentation.
  18. Like
    Marc got a reaction from dubnet in [Energia Library] ZigBee   
    I just packaged Anaren's ZigBee interface firmware for their A2530 module into an Energia Library. For those interested check out: https://github.com/mweintra/ZigBee
     
    It is compatible with most launchpads (see https://github.com/mweintra/ZigBee/wiki). Basic tutorials and examples are provided, I am still working on the reference documentation.
  19. Like
    Marc got a reaction from spirilis in [Energia Library] ZigBee   
    I just packaged Anaren's ZigBee interface firmware for their A2530 module into an Energia Library. For those interested check out: https://github.com/mweintra/ZigBee
     
    It is compatible with most launchpads (see https://github.com/mweintra/ZigBee/wiki). Basic tutorials and examples are provided, I am still working on the reference documentation.
  20. Like
    Marc reacted to spirilis in CC3200 & SSL   
    Ok, the links up above now have a new commit - SSL root CA support.
     
    TBH, I have not got it to work 100% kosher yet.  I keep trying www.ti.com with various root certs (chrome says they use GeoTrust, the closest I can get is GeoTrust Global CA - but it gives a "date error", possibly b/c that needs an Intermediate CA yet there's no way to specify one in the CC3100/CC3200 that I can find).
     
    I may test it with my own private root CA + self-generated certificate just to prove that it works.
     
    The functions for managing that-
    .sslRootCA(uint8_t *derfile, size_t length) - requires binary DER format
    .useRootCA() - Looks for /cert/rootCA.der, if it exists, use it (so you don't have to keep re-uploading the root CA each time you load a sketch)
    .sslStrict(true/false) - Insist that only a perfectly executed SSL connection be passable.
    .sslGetReason() - returns a const char * string indicating the last known error from sl_Connect(), good way to figure out WTF went wrong with your SSL connection attempt.
    .sslIsVerified - a public variable, test this after making a connection to see if it's truly a verified connection or not.
     
    If .sslRootCA() is called with either derfile = NULL or length = 0, the /cert/rootCA.der is deleted and the library won't attempt root CA verification anymore.
  21. Like
    Marc reacted to spirilis in New Energia release 0101E0013 - 09/05/2014   
    NEW FEATURE folks will want to be aware of!
     
    For msp430 and lm4f (Tiva/Stellaris), there are three new ways to pause or halt the CPU-
     
    void sleep(uint32_t milliseconds);
    void sleepSeconds(uint32_t seconds);
    void suspend();
     
    and a complementary function: wakeup()
     
    For the lm4f/tm4c platform, these are mostly just placeholders that do not consume any less power than usual; in the future I'd like to explore the ARM's low-power features to make them workable.
     
    For msp430 though, the first two use LPM3 modes, and the third enters LPM4.
    Energia tests XT1 osc. fault on reset to see if a 32.768KHz XTAL is present; if so, ACLK is set to that and it's noted that ACLK is being driven at 32.768KHz.  If not, VLOCLK is used and its nominal frequency is assumed to be its speed.
     
    When sleep() is called, the WDT is reworked to fire every ~1.9ms (varies XT1 vs VLO) using WDT_ADLY_1_9 while incrementing millis() and micros() as accurately as it can (which isn't always accurate... particularly with VLOCLK).  Alas, it does give you true LPM3 mode!
     
    sleepSeconds() uses WDT_ADLY_250, which is a much more coarse sleep interval but allows the chip to spend a whole lot more time asleep.
     
    suspend() just runs LPM4.
     
    The catch here is that normally IRQs firing won't wake up the chip permanently, and since Energia occupies the ISRs with its own routines, it's not possible for a user's ISR (registered via attachInterrupt() or similar) to run __bic_SR_register_on_exit to cancel the LPM mode.
     
    Enter wakeup().  The wakeup() function sets a volatile global flag which signals to the sleep(), sleepSeconds() or suspend() function that sleep mode should be aborted.  Moreover, many of the ISRs have been reworked to check for a change in this flag after it executes the user's ISR in order to determine if it should run __bic_SR_register_on_exit(LPM4_bits) itself.  This allows the user's ISR to cancel LPM mode.
     
    These functions (sleep(), sleepSeconds(), suspend() and wakeup()) also exist on the lm4f/tm4c platform, they just don't use any particularly low-power modes yet.  But still, the code should port over, and it does give you as a programmer a simple way to "halt" the CPU or pause with the option of aborting it early.
     
    Also note, LPM3/LPM4 will cause any Serial input to be corrupt, since the SMCLK isn't running for the UART module to correctly detect the bits.  This isn't the case for the Tiva/Stellaris yet, but will be once we implement true low power modes over there.
     
    The wakeup() handler has been added to the I2C ISR handler too, so it is (in theory) possible to configure the chip as an I2C slave with the Wire library and then suspend() to enter LPM4, then wakeup() upon receiving a request, since I2C is clocked externally.  (I haven't actually tested this yet...)
     
    I never got around to adding these functions to the cc3200 port, but will do so by the next release (or maybe offer a patch for it in between).
    (I just added the suspend() and wakeup() stuff, all props go to @@energia for the sleep/sleepSeconds/ACLK implementation )
  22. Like
    Marc got a reaction from energia in Using Smartconfig   
    The holdup seems to be in this segment of the code within startsmartconfig line 516:
            // Wait for Smartconfig process complete         while (ulSmartConfigFinished == 0)         {                 delay(500);         }   Temporarily I replaced this with a 20 second delay and it seems to work.
×
×
  • Create New...