
reaper7
-
Content Count
174 -
Joined
-
Last visited
-
Days Won
8
Reputation Activity
-
reaper7 got a reaction from lessarlz in [Energia Library] EtherEncLib for ENC28J60
@lessarlz - ENC28j60 is a spi device, so connection is very simple
for eg. if You are using MSP430G2553 board:
ENCpin MSPpin
Vcc PIN1 +3.3V
GND PIN20 GROUND
CS PIN10 P2_2 (you can change this pin in file enc28typedef.h - line 424, then also mandatory! in sketch pinMode(10,OUTPUT);
RESET PIN16 RESET
SI PIN15 P1_7 (MOSI)
SCK PIN7 P1_5 (SCK)
SO PIN14 P1_6 (MISO)
--
WOL, INT, CLKOUT -> not connected
-
reaper7 reacted to chicken in 2.5 sec delay after power up
Energia has a few timeouts while waiting for the optional external XTAL to spin up. According to the comments in wiring.c, the timeout is 2 seconds.
https://github.com/energia/Energia/blob/master/hardware/msp430/cores/msp430/wiring.c
(Line 80 or thereabouts)
-
-
reaper7 reacted to PortHarcourtBoy in 1K serial gdb_bootloader
Thanks for the confirmation!
The project I am working on will be providing OTA firmware updates to the MSP430G2553 via a serial over bluetooth in place of the serial cable; the host side being a linux server. Any recommendations on the most efficient means of tackling this?
-
reaper7 reacted to chicken in [Energia Library] Hardware Counter Library for MSP430
From time to time, threads pop up where someone tries to count very fast pulses in the hundreds of kHz or even MHz range. There is a solution for the hardcore C-coders among us, but to my surprise there was no Energia library for this simple problem.
I herewith present the CounterLib for Energia
Download
Source code and detailed instructions are also available on GitHub:
https://github.com/astuder/CounterLib-Energia
Currently the library supports MSP430G2553, MSP430F5529 and MSP430FR5969.
To create an instance of the counter, simply declare it as a global variable like this:
Counter<> MyCounter; // create a counter that counts pulses on pin P1.0Once created, the counter has 5 functions:start() initializes the timer peripheral and I/O pin and starts the counter stop() stops the counter, but does not reset the counter value read() reads the current value of the counter reset() resets the counter to 0, the counter keeps running readAndReset() reads the current value and resets the counter to 0 And a basic example, which should work for signals lower than 65 kHz:
Counter<> MyCounter; // create counter that counts pulses on pin P1.0 void setup() { Serial.begin(9600); MyCounter.start(); // start counter } void loop() { MyCounter.reset(); // reset counter to zero delay(1000); // wait one second Serial.println(MyCounter.read()); // read number of pulses during the last second delay(1000); // wait another second } The library also supports dividers to measure much faster signals. For more detailed instructions see GitHub.
The library uses the external clock input of the timer peripheral. This enables the library to measure very fast signals (MHz range). On the downside, each timer only has a specific pin assigned, and the G2553 only has one timer with an external pin. It is also possible, that other Energia libraries or built-in functionality use the same timer, which won't work.
Here's a list of the timers supported by the library and their pins:
| Timer | G2553,| | | | | | G2452,| F5529 | FR5969 | FR6989 | | | G2231 | | | | |------------|-------|-------|--------|--------| | CL_TimerA0 | P1.0 | P1.0 | P1.2 | P1.2* | | CL_TimerA1 | n/a | P1.6 | P1.1* | P1.1* | | CL_TimerA2 | n/a | P2.2 | n/a | n/a | | CL_TimerB0 | n/a | P7.7*| P2.0* | P2.0 |Pins marked with * are not broken out on the LaunchPad or are difficult to access.
The library probably works on many other MSP430's, but you'll need to adjust the #defines in the library. Please report back if you successfully tested with other devices, so that I can extend the library.
Please report any bugs.
And also let me know if you break any speed records. So far I only tested it up to 750 kHz.
Edit 9/3/15: Added support for FR5969. Thanks @@Fmilburn
Edit 9/4/15: Refactored to make it easier to add more MCUs. Several bug fixes, thanks to all the eagle-eyed members of 43oh
Edit 3/13/16: Replaced attached ZIP file with link to GitHub to always give up-to-date version
-
-
reaper7 reacted to L.R.A in [Energia Library] Time_Capture
There were some problems with the first library.
The source of the problem can be seen here:
https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/431233
Updated library to v2.0
-
reaper7 reacted to Lgbeno in Alpha testing of analog.io MQTT web terminal
I've been having some fun recently with a pretty simple board. I mentioned it last week on this thread. It is really inspired by @@cubeberg who has done a lot more work with bridging nRF24 communications back to the cloud then I have. He's using CC3200 but I wanted to try continue some work that I have been doing with ESP8266 and MQTT. Both technologies are freakishly cool!
The basic premise is that sensor nodes are powered by a single AAA battery, then I use a TPS61097A-33DBVT to boost the voltage to 3.3V. From there I power up a MSP430G2553 running some code that I wrote in Energia. The code basically reads a Si7020 temp/humidity sensor via I2C and dumps the readings to nRF24 using the @@spirilis library. On the other side, there is another one of these nodes in RX mode waiting for the nRF24 packets to come in and forwards them on to ESP8266 via UART.
What is new, is that I'm working on some ESP8266 code that takes incoming UART data and forwards it on to a MQTT broker running at analog.io. Then I have new web features to connect to this virtual terminal right inside of a browser. Embeds work too:
So what you see is live data coming across this system. If you type things into the terminal, it is transmitted live to the ESP8266 UART and subsequently the MSP430. I have not coded up any actions to take from the received messages yet but it would be fun to hear suggestions if anyone has them!
I haven't exposed this functionality to users yet but am curious if anyone wants to give it a try and help me work out the kinks (which I'm sure that there are many). Ultimately I think that I would like to make a product that is a super simple to use WiFi UART that could be added to any project, then users can decide how they want to use it.
Some pictures:
-
reaper7 reacted to Lgbeno in Cheap solar battery + wireless IoT node
Having some fun with nRF24 today. This library is so easy to use, thanks @@spirilis
Sent from my iPhone using Tapatalk
-
reaper7 reacted to Rei Vilo in MSP432 LaunchPad Pins Maps
Here are the pins maps for the new MSP432 LaunchPad!
-
reaper7 reacted to Lauszus in LaunchPad Flight Controller
Hi everyone,
Just wanted to share my flight controller I wrote some time ago
Here is a video of it:
The code is available here: https://github.com/Lauszus/LaunchPadFlightController.
You can read more about it at my blog: http://blog.tkjelectronics.dk/2015/01/launchpad-flight-controller/.
Regards
Kristian Sloth Lauszus
-
reaper7 got a reaction from bluehash in Merged forums support thread
Hi,
after merge, when I try to enter 43oh ? Tiva-C, Hercules, CC3XXX ARM Technical Forums ? Energia
http://forum.43oh.com/forum/79-energia/
then I get password monit "Enter Forum Password" and when I write valid password I get "Sorry, you don't have permission for that!"
but I can enter to subforum ?Energia Libraries
and I can edit my posts
-
reaper7 reacted to Rei Vilo in [Energia Library] LCD_screen Library Suite
The LCD_screen Library Suite release 225 supports a wide selection of screens on different platforms, including Energia, Teensy and Arduino.
Screen_ER1963 and Screen_ER1963_SD Screen_ER8875 and Screen_ER8875_SD Screen_HI32 Screen_HX8353E Screen_HY28A Screen_HY28A_SRAM Screen_ILI9225B Screen_ILI9340 Screen_K35 Screen_K35_SPI Screen_K70 Screen_PICadillo Screen_PicasoSGC Screen_PicasoSPE Screen_ST7735 Screen_W32 Link: http://embeddedcomputing.weebly.com/lcd_screen-library-suite.html -
reaper7 got a reaction from xv4y in [Energia Library] StellarPad EtherCard (enc28j60) library
This is a JeeLab ENC28J60 library mod for Energia StellarPad,
working OK with other devices on the same SPI bus.
Library:
Ethercard_v09a.zip
Ethercard_v09.zip
Ethercard_v08.zip
EtherCard_v07a.zip
EtherCard_v07.zip
EtherCard_v06.zip
EtherCard_v05.zip
New version 0.9a [28.06.2014]:
1. fix wrong type of variable in emit_p
2. fixes by Francis Van Den Bussche, email 9/5/2014
3. fixed obvious bug, redmine issue #539
4. update README info and links
5. Add documentation on class BufferFiller
New version 0.9 [20.06.2014]:
1. added all fixes since my last release -> exactly between 01-03.05.2014 (https://github.com/jcw/ethercard/commits/master)
2. library (v09) from now should work on MSP430F5529 too, please test
New version 0.8 [26.04.2014]:
1. Fixes issue #492 (DNS lookup fails)
New version 0.7a [07.04.2014]:
1. changes inside dhcp.cpp - Custom DHCP option processing #119
New version 0.7 [05.04.2014]:
1. contains all github fixes since the last release.
2. working with oryginal spi library from Energia 0101E0012
New version 0.6 [27.04.2013]:
1. For clarity *.ino files I decided to move SPI initialize to library.
from now begin look like this: ether.begin(sizeof Ethernet::buffer, mymac, CS_PIN, SPI_MODULE).
eg.:
- ether.begin(sizeof Ethernet::buffer, mymac) -> DEFAULT initialize eth on SPI 2 & Chip Select on PB_5
- ether.begin(sizeof Ethernet::buffer, mymac, PD_1, 3) -> initialize eth on SPI 3 & Chip Select on PD_1
SPI speed is defined in enc28j60.cpp file (line 256), maybe more sense is move SPI speed to begin too?
New version 0.5 [20.04.2013]:
1. "DHCP fix" - Andy Lindsay github commit
New version 0.4 [12.04.2013]:
1. "Implemented a simple UDP listening server, that listens for packets on ports and triggers callbacks" - brianlah87 github commit
New version 0.3 [04.04.2013]:
1. "adding header arg to browseUrl" - jscrane github commit
New version 0.2 [24.02.2013]:
1. "Accept of tcp packets refactored to a separate method" - mrbig github commit
2. New example for the above: "quasiMultiport" -> You can open more browser windows on different ports with different contents e.g.
http://stella_ip, http://stella_ip:1224, http://stella_ip:22222, etc... 3. New function setupWakeUp() in enc28j60.cpp/h -> You can setup enc28j60 to filter/receive only WOL package for e.g. WakeUp host (StellarPad) from hibernation,(enc28j60 pdf - chapter 12.2.1 pt1-3), return to normal mode through existing function enableBroadcast()
P.S. pt2 & 3 is my low quality ideas, so - don't report problem with them to jeelib
still is some bugs e.g. DHCP with mac addr starting with first number > 0 not working for me :-/
Connections (If You are using default Energia SPI bus 2):
My sandwich StellarPad + universal ENC28J60 module from e.g. eBay + LCD5110 with tongue (nrf24l01+):
Sandwich get temperature from remote sensor (based on my second StellarPad and this project moved to Energia) via MiRF library,
display temp on LCD5110 modified library (number & graph idea by timotet) and create a simply web page to display temp
This is a very simply and fast making test platform
-
reaper7 reacted to superbrew in [Energia Library] StellarPad EtherCard (enc28j60) library
Hi,
I am able to get the testDHCP example working, but on others I get the following error:
In function `abort': abort.c:(.text.abort+0xa): undefined reference to `_exit' collect2.exe: error: ld returned 1 exit status How do I fix that?
I have tried different versions of Energia, I have replaced the 'cores' lm4f library, I have replaced spi.cpp and spi.h.
EDIT: I figured it out, there is a commented section in startup_gcc.c
__attribute__((weak)) extern void _exit (void) { } I uncommented and it is working fine now.
-
reaper7 reacted to nitred in [Energia Library] Simple CC3200 RTC emulation library (ccRTC)
Hi,
I've made a very simple RTC library using the RTC method in the PRCM library.
It is intended for the CC3200 Launchpad and has only been tested on the CC3200 Launchpad so far.
Overview:
Uses the PRCM library It follows UNIX Time It was made with the "Time" library of the Sparkcore in mind. It has the following methods:ccRTC.zone() ccRTC.now() ccRTC.year() ccRTC.month() ccRTC.day() ccRTC.weekday() ccRTC.hour() ccRTC.minute() ** ccRTC.begin() Limitations: (Unfortunately there are a few actual limitations)
It is accurate to only about 4 seconds an hour. (That is pretty bad, but can it can be used for non time critical applications if time is synced with an online server regularly) My tests haven't shown any issues so far, but it is not foolproof yet. If you're using an NTP server to sync time, then you'll need to convert it to UNIX time first before you use the ccRTC.setTime()
You can get the code and a basic guide from here : https://github.com/nitred/ccRTC
Additional Documentation for the the functionality can be found here : http://docs.spark.io/firmware/#libraries-timeIt
Its a work in progress and I know for a fact that there's a better way to do it than this but I really needed this library and I hope you find it helpful too. Any and all feedback and improvements are welcome!
-
reaper7 reacted to spirilis in [Tiva] delayMicroseconds unreliable
@@energia is going to review the pull request before merging, but for now I made a zip "service pack" with all the recent changes from github issue #475.
E13_servicepack_timers_10272014.zip
Changes:
- cc3200's SysTick-based implementation fixed for delays and micros, and its implementation backported to lm4f
- lm4f (Stellaris/Tiva) now uses SysTick exclusively for millis, micros, delays; Timer5 has been relieved of service.
- cc3200 now has sleep, sleepSeconds, suspend and wakeup just like lm4f; it's the same (strawman, non-low-power) implementation. I want to make this legitimately low-power soon.
- also a cc3200 change in here to let C++ constructors work correctly for pinMode, digitalWrite, etc. (not recommended library designers use this, but some Arduino libraries unfortunately do that; Tiva already had the fix in E13)
-
reaper7 reacted to spirilis in Non volatile memory options for cc3200
FYI-
https://github.com/spirilis/SLFS
Zip of current code: SLFS.zip
Unzip that in ~/Documents/Energia/libraries or wherever.
Be sure you have an updated copy of the WiFi library, as it needs WiFi.init() to be a public method.
My latest copy is here: simplelink_wifi_library_latest_10142014.zip - unzip that from within your Energia install's toplevel directory (e.g. from within C:\energia-0101E0013).
(that actually has one change ahead of Energia's current github master; it moves the various WiFi buffers to .text section on FRAM chips so they will fit on the Wolverine FR5969 LaunchPad w/ CC3100)
The SLFS library declares an instance right away called "SerFlash", so SerFlash.open(), SerFlash.close(), SerFlash.write(), SerFlash.print(), SerFlash.println(), etc...
You can delete files using SerFlash.del()
You cannot list the directory contents or know what files are on the flash. I did not find any API calls in the SimpleLink API that support such a feature. I'm assuming it's been left out for security reasons or similar.
The open() system call is given options based on the sl_FsOpen() SimpleLink API call, so... looking at documentation here- http://software-dl.ti.com/ecs/cc31xx/APIs/public/cc31xx_simplelink/latest/html/index.html ... look at "File System" and then "sl_FsOpen":
open file for read or write from/to storage device Parameters [in] pFileName File Name buffer pointer [in] AccessModeAndMaxSize Options: As described below [in] pToken Reserved for future use. Use NULL for this field [out] pFileHandle Pointing on the file and used for read and write commands to the file AccessModeAndMaxSize possible input FS_MODE_OPEN_READ - Read a file FS_MODE_OPEN_WRITE - Open for write for an existing file FS_MODE_OPEN_CREATE(maxSizeInBytes,accessModeFlags) - Open for creating a new file. Max file size is defined in bytes. For optimal FS size, use max size in 4K-512 bytes steps (e.g. 3584,7680,117760) Several access modes bits can be combined together from SlFileOpenFlags_e enum The syntax for SerFlash.open() therefore is something like this:
SerFlash.open("myfile.txt", FS_MODE_OPEN_READ); // Open file for reading
SerFlash.open("myfile.txt", FS_MODE_OPEN_CREATE(1024, _FS_FILE_OPEN_FLAG_COMMIT)); // Create new file, allocated 1024 bytes to contain it
SerFlash.open("myfile.txt", FS_MODE_OPEN_WRITE); // Open file for re-writing
From what I've been able to gather, you can't open an existing file and write pieces of it piecemeal; opening the file and writing forces the serial flash to erase the entire block, so what you write replaces the prior contents entirely. So for updating configuration info, you would need to read it into memory, make your changes and then re-write the entire file. Also, there's a maximum # of files you can store ... something like 128 I believe, and that includes a number of system files in that count which are already there. It's not meant to be a huge filesystem. But it should do the trick for a lot of uses.
-
reaper7 reacted to Lgbeno in [Energia Library] Software I2C Master for MSP430G2553
After quite a bit of testing, I think that I have some improvements for the version of software i2c in this thread.
The changes that I made are:
Support for Wire.endTransmission(false);
Also I added support clock stretching during i2c reads.
SoftwareSerial.zip
-
reaper7 got a reaction from spirilis in cc3200 compile error when using binary formatter
try to add
#include "binary.h" to \energia\hardware\cc3200\cores\cc3200\Energia.h
something like this:
#define __CC3200R1M1RGC__ #include <stdint.h> #include <stdbool.h> #include <string.h> #include <math.h> #include <itoa.h> #include "binary.h" #include "inc/hw_types.h" #include "inc/hw_nvic.h" #include "driverlib/gpio.h" #include "driverlib/rom_map.h" #include "driverlib/interrupt.h" -
reaper7 reacted to Antscran in MSP430 voice control over bluetooth
Hi all,
I was playing around with the MSP430G2553 and the UART at the weekend, then remembered I had a cheap HC06 bluetooth module. The result being a basic Android app that you can control your launchpad using voice control, it's far from polished but a bit of fun all the same
Project tutorial. C code and Android App http://coder-tronics.com/msp430-voice-control-over-bluetooth/
Video demonstration https://www.youtube.com/watch?v=8Z5ixK30Ddc
Cheers,
Ant
-
reaper7 got a reaction from CorB in Energia-013 ethernet example doesn't compile
look at this:
https://github.com/energia/Energia/commit/aa5509e8ab146d715e3b0369c755b1a2ef0dcc14
https://github.com/energia/Energia/issues/464
simply remove
const IPAddress INADDR_NONE(0,0,0,0); from hardware/lm4f/libraries/Ethernet/Ethernet.h
-
reaper7 reacted to tml in MSP430-based solar-powered weather station
Hi Folks,
Some time ago in a thread http://forum.43oh.com/topic/5550-simple-msp430f5529-bootloader/
I shared my bootloader that I wrote for my weather station project.
I'd like to share some info on the project that I have completed and that its now operating in the field.
Link to the description: http://eltomek.blogspot.com/2014/10/diy-weather-station.html
All comments are welcome. Thanks all from this forum who helped me in numerous posts where I had no idea how to get out of technical issues!
Best Regards,
Tomek
-
reaper7 reacted to spirilis in CC3200 Wifi delay issue
Ok, here we go...
Client connected! All clients: Client 0 at IP=192.168.1.2, MAC=88:32:9b:47:74:7d Client disconnected. code:
static int peerdevs = 0; int nowdevs = 0; nowdevs = WiFi.getTotalDevices(); if (nowdevs > peerdevs) { Serial.println("Client connected! All clients:"); for (i=0; i < nowdevs; i++) { Serial.print("Client "); Serial.print(i); Serial.print(" at IP="); Serial.print(WiFi.deviceIpAddress(i)); Serial.print(", MAC="); Serial.println(WiFi.deviceMacAddress(i)); } } if (nowdevs < peerdevs) { Serial.println("Client disconnected."); } peerdevs = nowdevs; The .macAddress() function was already taken so prepending device to those names makes more sense to me. deviceMacAddress() writes a string to a privately-kept buffer that gets overwritten each subsequent execution of the command, that buffer is then returned as a const char * string for printing. If we decide to make a MACAddress class to go alongside IPAddress, that will be improved.
Change committed to git (branch issue_480) for CC3200 & msp430/lm4f CC3100.
-
reaper7 reacted to energia in CC3200 Wifi delay issue
Awesome! These functions can be used to filter, identify, etc connected clients..
The private buffer could potentially be dangerous if users make the assumption that the pointer returned is unique and pointing to which ever device I asked it for.
Would a similar implementation as the .macAddress() work better?
uint8_t* WiFiClass::deviceMacAddress(uint8_t* mac)