Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by igor

  1. It is on github in my fork of eLua, in the branch named SAM. The direct link is. https://github.com/ecdr/elua/tree/SAM Most of the SAM specific adaptations are in the src/platform/sam34 directory. https://github.com/ecdr/elua/tree/SAM/src/platform/sam34 If you haven't used git it takes a bit of learning, but is really nice when using/managing a large project. I haven't done much on this recently, but would welcome contributions to the branch. (Would be nice to get it totally working and incorporate into the eLua main line.)
  2. More particulars - what giving you problems, how long do you need to store, etc. (The quick answer is put the readings in an array - then they are stored. But maybe you want to do something more than that.) www.catb.org/esr/faqs/smart-questions.html
  3. Did you consider just using an old (or new prepaid) cell phone? At least in the US one can get no contract prepaid android cell phones for 5 to 15 USD. (on sale, but they are on sale routinely) Gives you battery, GPS, flash storage, some have uSD. Don't know if you could find one as small as your previous unit (I didn't see dimensions listed). Of course programming it would be a pain (unless you could use one of the existing hike logging apps). Weatherproofing might also be an issue, as might weight. (Might also give you other things to play with if you wanted - like compass, acce
  4. The main thing to be kept short in an ISR is execution time. Even the longest execution path in this ISR isn't long. 3-4 compares, a similar number of assignments, maybe a computed jump. Doesn't even have any procedure calls or loops.
  5. What is your actual sampling frequency? With this code speed of the ADC is least of your worries. Print takes a long time, so would try to optimize that first (i.e., move it out of the loop if you can - just record the values in the loop, then worry about finding the maximum and displaying it). Once you have gotten the prints out of the way, if it still isn't fast enough could look at inlining the reads/writes. (The arduino/Energia calls are nice for abstraction and portability, but they are slow.) If you wanted to get fancier about it (and your threshold was amenable) you might be
  6. Once you get this going if you need to make it even faster the Tiva C has some nice features for reading/writing GPIO pins - if you read/write from an address that is at an offset from the base port address the offset acts as a mask - so you don't have to suffer the overhead of read/modify/write, or have to mask the read value. See the Tiva C documentation. I posted some macros that help with this someplace on 43oh, (think it is in the thread about porting arduino libraries) but don't have time now to find the post.
  7. Where did you make the function take a void argument? Need to do in function definition, just leave function name in call. void calibrate(void) { if(maxValue<threshold) maxValue=threshold; }
  8. Rather than using ADC, have you considered using the comparator? (I believe this device has one). You would have to see if it does what you want (e.g. can you set threshold voltage close enough to what you want to do). If it did, you might be able to just set up the timer and comparator, go to sleep until you got a comparator interrupt, then record the crossing, reset the comparator, and go back to sleep.
  9. Keeping pointer in RAM would be good move if you could. If you can't, can you get away with not storing a pointer at all? When you need to add a reading, search for the the end of where readings already are - takes more time, and have to reserve one reading value to mean there is no reading, but don't have to store the pointer. Using binary search should be able to find the end in order of log2(maximum number of samples). (One of the examples below just used a simple linear search.) I have definitely seen a temperature logger for the MSP430 using flash a long time ago. This isn'
  10. Many of the simpler changes mentioned in the howto thread can be handled automatically using macros, etc. More recent versions of Energia include some macros which handle some of the changes mentioned in the thread. Having standard, cross-platform libraries for some common functions (which are not currently abstracted) would help. (i.e. create a common abstraction layer for functions which are currently handled on a device specific basis). For instance: a standard timer class. I worked some on a cross-platform timer object which would work on MSP430, AVR, SAM, Tiva. (Based on DueTim
  11. In the description you say you want the pin to go high, but in the code you make the pin change from whatever state it is to the reverse. (P1OUT ^= BIT6) - rather than make it high (P1OUT |= BIT6), likewise the timer interrupt toggles a (different) pin, rather than turning it off. "If the code and the comments disagree, then both are probably wrong." --attributed to Norm Schryer What does the program do currently? (In what way does it not work.)
  12. Have you tried generating an assembler listing of the code produced by Energia, and looked through that to see what instructions are being generated? It is a little convoluted to do (wish there was a switch/button for it in Energia). e.g. http://forum.43oh.com/topic/7485-assembler-listing/
  13. Out of curiosity, why use a USB storage device rather than SD card? (Since there are already libraries for SD card access.)
  14. Seems like an ethernet witch would be just the thing for the thread on halloween projects. ;-)
  15. Wouldn't it make something like remotely controlling vehicles easier? Chevrolet's ethernet to CAN bridge seems very ad-hock. http://hackaday.com/2015/08/22/how-those-hacker-took-complete-control-of-that-jeep/ I do not think that connecting cars to networks is sensible, however there is a big push to do that. I do not have a need for such a bridge, but I can see where it could be useful for those experimenting with V2V, etc. http://hackaday.com/2015/09/02/v2v-means-safer-roads/ Seems like a really strong firewall/packet sanitizer/saneitizer should be part of such a device, since C
  16. You could try a USB switch (not a common item, but I am pretty sure I have seen them). On the stellaris launchpads I have sometimes used the power switch (but don't have that on the 430 LP). One might be able to wire the serial lines up to a serial switch (i.e. use one programmer section, but have it connected to multiple launchpads through a switch - old serial switches should be easy to come by second hand). Does TI's flashing utility work with multiple MSP launchpads attached? (e.g. could you rig up a script to do the flashing using an external program).
  17. Not sure if I can go or not. Would be happy to volunteer at a table like last year. I could be up for a meet up.
  18. On the Tiva processors the I/O ports have a nice masking property - you can use part of the address as a mask so that only certain bits are accessed. (e.g. if you write to a port at a certain offset from the ports base address, it will only change bits 1 and 2 of the port (for instance), and leave the rest alone). Handy if you need to read or change multiple bits at once (and faster than doing one bit at a time). Don't know if the 432 has that feature, and only useful if you need to do more than one bit at once.
  19. Which booster pack connector are you using? (#1 - SPI port 2, #2 - SPI port 5) Which SPI port did you tell it, and which chipSelectPin did you use?
  20. For libraries also running on the MSP LaunchPads with Energia, please consider carefully where to post - whether you want to manage two threads about your library, or whether you want to just post it in one forum, and maybe post a message linking to the primary thread in the other forum. The updated link for the MSP LaunchPad Libraries forum is: http://forum.43oh.com/forum/124-msp-energia-libraries/
  21. The thread linked below provides tips on porting libraries to energia. howto: porting libraries
  22. The thread linked below provides tips on porting libraries to energia. howto: porting libraries
  23. Sharing and using libraries: Some Misconceptions about Libraries Posting a Library for Energia
  24. If you have a GPS on board, what do you need a time server for?
  25. Seems like reputation/likes from stellarisiti are not recorded/counted after merge. If memory serves I had just about reached the magic 100 reputation before the merge (at least if you count likes on 43oh and Stellarisiti, don't remember specific numbers from either one). Now I have lost a bunch of those reputation points. It looks like my account from Stellarisiti ( igor1426459857 ) is getting its reputation reported as 0 - despite there being various liked posts on the merged board (e.g., http://forum.43oh.com/topic/7029-elua-for-stellaris-launchpad ). (Wouldn't matter much, except s
  • Create New...