Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by tripwire

  1. Yes, that's the method described in the blog post I linked. I just posted this as an alternative because I've not seen it before. Indeed, I've seen it claimed that the interrupt handler is the only possible way to track the reset button state. You could do that if you have a spare GPIO and don't mind having a loose switch. Even then, it's only four lines of code to poll the reset button...
  2. I've been working on a project for MSP-EXP430G2 which requires two buttons and hit the problem that S1 is set up as a reset button. Unlike S2 it's not connected to a regular GPIO pin; instead it's connected to the nRST/NMI pin. I looked for information on using the reset button as a user input and found some examples, but they all used the NMI ISR to track rising and falling edges. For example, see this post from the 43oh blog: Using the MSP430G2xx1 nRST NMI Pin as an Input. I really wanted some way to sample the current state of the button directly, which is tricky because there's n
  3. Another thing that might make this code unreliable is that you aren't setting P1OUT bit 3 high. Setting a bit in PxREN connects the pull resistor to the corresponding pin, but the pull direction is given by the value of the relevant PxOUT bit. The value of PxOUT is unspecified on startup and power-on clear, so you might be getting a pulldown resistor instead of pullup.
  4. Hi, I'm hoping some of you might have had experience of waterproofing sensor nodes or individual sensors, and can make suggestions. I have a project using the SensorTag to measure altitude, and need to seal it up enough that it doesn't fail after the first rain shower. It doesn't need to be completely watertight as it should never be submerged, but it needs to resist heavy and persistent rain. It can't go in a hard-shelled airtight container as that would interfere with the pressure measurements. It would probably be a bad idea to get conformal coating in the sensor port too. I'm not
  5. This is down to the subtleties of integral promotions in C. The standard says this for the bitwise shift operators: "The integral promotions are performed on each of the operands. The type of the result is that of the promoted left operand. If the value of the right operand is negative or is greater than or equal to the width in bits of the promoted left operand, the behavior is undefined." Integral promotion can "widen" a type as far as unsigned int, which is 16 bits on MSP430. The RHS of the shift is 16, so that means undefined behaviour; in this case that seems to mean (100 <&l
  6. Either way works (char const * const is equivalent to const char * const). That cdecl site only accepts the latter, however. The const after the * is the one that makes the pointers in the array const. You could get away with omitting the first const in this case, but I tend to just use both.
  7. If anything I'd have expected: 5, 4, 1, 3, 2, 0 (sorted by key rather than value or insertion order). That's what you'd get out of a std::map in C++. The C++ standard library designers originally avoided the issue of unspecified map iteration order by only permitting ordered maps, and hash-based maps were not officially included until C++11. In terms of performance, it looks like the randomisation in go is a random start offset rather than a complete shuffling of the iteration order. That's just enough to prevent anyone from relying on the order from one iteration to the next. They mig
  8. Agreed. That's why I'm not delighted by the prospect of IoT-mania encouraging a proliferation of cheap internet-connected devices.
  9. Or the person making the IoT device *DOESN'T* (Yes, this has since been patched out)
  10. That works against remote attacks, but the linux/BSD/non-windows server protecting the wireless device can be bypassed if you're in the vicinity. Then the unsecure wireless device can be exploited to leak your wireless key (for example). The scale of that approach is greatly limited by the need to be near the target, but it means you can't assume a secure router will protect you if the devices are unsecure.
  11. So, yeah: "Designing an internet-facing server with security protection can be a very challenging task" is fair enough. It's not so much that the original title implies the world will end if you don't attend, more that it implies the content is somehow specific to IoT when it's not. What would be nice is if someone came up with a way to deal with the security holes left in the many internet "things" abandoned by their manufacturers without ongoing firmware updates...
  12. Good news! This issue is fixed in the TI Emulators package, which contains the version firmware for XDS110. TI have added support for 2-wire cJTAG debugging, which only uses the TMS and TCK lines. In the firmware they also stopped the emulator from driving TDO, which was blocking access to the SPI. It looks like 2-wire cJTAG is the default mode now too, so debugging SPI flash code should just work like you'd expect.
  13. Except when the onboard USB hub goes out to lunch
  14. Strange. I wonder if it has anything to do with the fact that the G2 launchpad has a different emulator to all the others.
  15. This is one of my pet hates too. I find energy profiling to be an incredibly powerful debugging tool, it's like an ECG for your MCU! Unfortunately the UI in CCS has a lot of bugs and missing features that make it inconvenient to use and a lot less reliable than I'd like. I used to have a long list of requests for features that would make EnergyTrace more informative, now I just be happy with CSV export of the recorded data for offline analysis. This week I looked into using DSS scripting which does support CSV output, but the EnergyTrace DVT API is completely undocumented. I think my n
  16. I've done this little mod on a MSP432 launchpad so I can program the CC2650 SensorTag with it (and use energytrace too). The 1x7 0.05" headers aren't the easiest to get hold of, so I just took a standard 10-pin cortex debug cable, cut it in half and soldered it directly to J103. The connections needed are (LP -> Cortex debug connector): GND -> GNDDetect (pin 9) RST -> nRESET (pin 10) SWCLK -> SWDCLK/TCK (pin 4) SWDIO -> SWDIO/TMS (pin 2) 3V3 -> VTref (pin 1) Pin 1 is marked by the red stripe on the cable linked above. Apart from making sure to read the pin numbers the r
  17. I like the idea of making it compatible with the kentec touchscreen boosterpack, but stacking one of those above your board would block access to the buttons. If instead used with the onboard OLED display or headless you'd have pushbuttons immediately next to a set of upward pointing male boosterpack headers. Have you thought about using right-angle tactile switches pointing off the edges of the board? TI has just started to use them on their launchpads: http://www.ti.com/ww/en/launchpad/launchpads-connected-launchxl-cc2650.html#tabs
  18. Recently I took a trip to the US, which offered a good opportunity to test my altitude logger by recording a profile of the whole journey there. The trace revealed some interesting details about the flights I took, and airline operations in general. Here's the profile for the entire trip: The x-axis shows elapsed time in minutes. The altitude is shown in metres, measured relative to the start of the trace (not too far above sea level). Despite that I'll be using feet as the unit of altitude here, since that's the standard used in aviation. Because the logger calculates altitude based on
  19. It looks like the author also made a tool to use EnergyTrace without needing to install CCS, might be worth a look: https://github.com/carrotIndustries/energytrace-util
  20. Did TI use V1.2 as a "board" version number for MSP-EXP430FR5969 previously? If so, what's the version of the eZ-FET used on that board?
  21. That information on the Energia site looks a bit confusing to me. The MSP-EXP430FR5969 board has two different version numbers: One for the eZ-FET and another for the entire board. The version 2.0 board is the one that features EnergyTrace, but the version of the eZ-FET on that board is 1.2. I think the Energia site is saying that if you have the board that says "eZ-FET Rev 1.2 with Energy Trace" then it's probably a V2.0 board. When that documentation page was written Energia didn't support this new board, only the old one without EnergyTrace. This means there isn't a upgrade path as
  22. Then comes the really tricky bit, optical alignment... the lens assembly needs to be centred over the sensor array (which is not centred within the package). Also I just noticed in the datasheet that the mounting isn't just at the BGA pads. You're expected to use a non-conductive underfill to thermally bond the bulk of the package to a copper pour for heatsinking and stabilisation.
  23. Pretty much, yes. For statement 1 I wouldn't say the object is deleted/freed because it was never new'd or malloc'd, but it does get destroyed by the implicit call to ~String(). For information, statement 1 could be written as just "String aStr("abc");", which has the same end result but avoids constructing a temporary string and then copying it to aStr. I wasn't too sure whether the compiler would perform this optimisation itself, so I checked wikipedia: https://en.wikipedia.org/wiki/Copy_elision. It looks like this case is commonly optimised, but writing String aStr = String("abc"); does
  24. The 2nd generation Kinect that shipped with the Xbox One uses time of flight to calculate depth. There's a nice summary of the method here: http://www.gamasutra.com/blogs/DanielLau/20131127/205820/The_Science_Behind_Kinects_or_Kinect_10_versus_20.php. It also explains the structured light system used in the original Kinect and compares the pros and cons of each system. Regarding the sensor and controller being separate chips, I think that may be unlikely to change. The sensor is made using a "chip on glass" process which I suspect isn't ideal for the controller. Also, keeping the controller
  • Create New...