Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    bluehash reacted to yyrkoon in Setting up a workspace - setup suggestions?   
    Yeah, first off. Avoid anything from Harbor freight if you hate spending good money after bad. Their parts boxes with clear plastic drawers where you have say 4-5 across, and 8 high( or whatever ) are garbage. My buddy bought like ten of these, and less than a year later the drawers, and boxes started disintegrating. All of their other stuff is garbage too. Search youtube for "harbor freight", and get the gist.
    As for the one thing I personally find "most desirable". That would be more work space. Our place has lots of work space, but not where I spend most of my time. In my own area, I'm constantly struggling to keep space clear for development boards, prototypes, etc as I develop software and test the hardware. I even built a 4'x8'( full sheet plywood ) workbench, that is a bit higher than waist high to make it easy to work on things while standing. Off of one corner, I have a one of the 4x4 legs built up with stacked 2x6's( screwed together ) to accommodate a custom built, by me, swing arm for my laptop Pretty much, I was given  the base for this, and I welded together galvanized pipe, and angle iron as the post mount, and then 3 other pieces of pipe for the laptop base to swivel on.
    Anyway, I did not really plan all of this from the start, so it does not work out the way I had hoped. So I think the best possible thing you could probably do is draw up several plans, until you're happy with something for making the best possible use of your space. Then gives you what you want.
    Also, at first thought, it may make sense to keep your electronic design space separate from your software development space. Which make total sense to me too. However, if we're talking about constantly moving between the garage and an in house room. That could present its self as a problem. So it may make better sense to *somehow* do all this inside your room, and keep the garage for other things like . . . I don't know project box fabrication, etc, if you're into that sort of thing.
    As for a good place to find related tools ? I find amazon a good place to start looking sometimes, but may not necessarily purchase form amazon. Or sometimes I'll just google, find something, then check to see if amazon has comparable prices. But I also am an Amazom Prime member, So I usually get free shipping on everything.
    So maybe, consider buying some cabinets to hang on the wall above your work benches, so all you have to do is stand up to grab something that may not always need to be on the bench. Then have your benches shallow enough to be  able to do that. Maybe 2-3 feet from the wall out. This way, you could potentially span a whole wall with one long bench, then have storage above in easily accessible cabinets. Or you could do a whole room like this is you wish, Which we've done here. Several rooms actually. As for monitors, do you really need more than one ? I know, I prefer at least dual monitors too for documentation, and editor type situations, but you may only need one. But if you need a single, double or even triple stand, Amazon has a wide variety of stands. Also keep in mind that some 4K monitors can be partitioned into 4 separate 1080p screen areas. So basically giving the possibility to have 4 screens displayed on 1. If something like that would work for you.
    With all that said, I think the most important thing you could do is start thinking about what you need, and want. Then start drawing up plans until you're happy with what you've come up with.
  2. Like
    bluehash reacted to Rickta59 in CCS v7 and Energia, Cannot Debug or Run Code   
    You can hack your gel script:
    $ diff tm4c1294ncpdt.gel rk1294ncpdt.gel  127a128,132 > OnRestart() > { >     GEL_AdvancedReset("System Reset", 1); > } >  $ pwd /home/kimballr/ti/ccsv7/ccs_base/emulation/gel  
  3. Like
    bluehash got a reaction from tripwire in 20170311 - Upgrade   
    Hello Everyone,
    Thanks for being patient while the forums were being fixed and upgraded. One Friday morning(March 10th, 2017), the server went down. There was a memory issue, which stalled the SQL server and everything came to halt. 
    it had been fixed by Friday night,  but then went down again due to a mistake I made during the bringup. In the mean time, I also decided to try to upgrade the server(php and peripheral updates) as well as the forum software. I'm going to see how things plan out in the next couple of days.
    Any issues you see with the site, please reply to this thread.
  4. Like
    bluehash got a reaction from Rei Vilo in CAPTCHA issue   
    Sorry arrived Vilo. I've disabled it for now.
  5. Like
    bluehash got a reaction from Medsimo in TIVA C, PWM mode   
    I used the 1294 Tiva as an example. I mentioned this in the post above.
  6. Like
    bluehash reacted to Peabody in G2553 BSL using BSLDEMO2?   
    I finally figured it out.  The special signalling pattern didn't work because DTR is inverted coming out of BSLDEMO2.  So that was never going to work.  But entering BSL cold start from an application gave errors because I used the +u switch in the command line.  It looked like that was the correct thing to do since I was indeed bypassing the signalling pattern, but for reasons I don't understand, when you use that switch the program doesn't send the password on all commands, in particular the ones I was trying to test with (read and verify).  But of course the G2553 was expecting a password for these commands, so I got an error.
    I've recompiled BSLDEMO2.exe from the source code provided by TI, but with the polarity of DTR reversed.  So it should all work now.  I've asked TI to publish a new version of BSLDEMO2 with DTR polarity the right way for use with the USB-to-serial adapters, but I doubt they will do that.  This is all "deprecated", so I doubt they will be willing to spend any effort or money fixing it.
  7. Like
    bluehash got a reaction from Medsimo in TIVA C, PWM mode   
    Quick calculation:
    Max system clock TivaC-1294: 120Mhz
    PWM divisors: /2,/4,/8,/16,/32,/64
    PWM bits: 16
    Min PWM frequency @120Mhz: 
    Slowest PWM clock : 120/64 = 1.875Mhz
    Max PWM load value = 65535(16-bit)
    Minimum PWM frequency = 65536/1875000 = 0.02495 seconds
    Inverse : 1/0.023495 = 28.6Hz.
    Max PWM frequency @120Mhz: 
    Fastest PWM clock : 120Mhz
    Min PWM load value = 2 - so that you can add 1 to the load value to get 50% duty.
    Maximum PWM frequency = 2/120000000 = 1.67e-8 seconds
    Inverse : 1/1.67e-8 = 60MHz.
  8. Like
    bluehash got a reaction from tripwire in FourThreeOh wins TI Community Highlight of the Year Award for 2016   
    Thanks @Rei Vilo.
    To all, the award goes to you too. Thanks for being wonderful members.
  9. Like
    bluehash reacted to hmjswt in External eeprom library   
    Hallo I am using this code for my 430G2553.
    /* LaunchPad EEPROM Author : Henk Siewert File : EEPROMTest Date : 27 september 2016 Version : 003 MCU : TI MSP430G2553 Memory : Microchip Language : Energia C++ Compiler : Energia 0101E0017 Systeem : Windows XP Pro SP3 Editor : NotePad++ WWW : http://www.swtcomp.com Pin 6 IC = SCL --> 9 LET OP! Nieuw in 17 Pin 5 IC = SDA --> 10 LET OP! Nieuw in 17 Pin 8 IC = VCC --> Vcc (3.3V) Pin 4 en 7 IC = GND --> GND 4,7K Pull up on pin 5 and 6 !!! Let op - Is jumper geplaatst? */ #include <Wire.h> // I2C library int disk1 = 0x50; // Address of EEPROM chip // 50 for Microchip 1,2,3 GND // 57 for Atmel 1,2,3 open #define memmax 32768 // Maximum memory: // 32768 for Microchip 24LC256 // 65536 for Microchip 24LC512 // 131072 for Microchip 24LC1026 // 4096 for Atmel 24C32 byte value = 133; // Value to write to EEPROM void setup(void) { Serial.begin(9600); // Start serial Wire.begin(); // Start I2C start(); // Start program } void start() { test(); } void test() // Write and read data to memory locations { for ( unsigned long address = 0; address < memmax; address++) { writeEEPROM(disk1, address, value); Serial.print( address ); Serial.print(" = "); Serial.print(readEEPROM(disk1, address)); Serial.println(" "); } } void writeEEPROM(int deviceaddress, unsigned long eeaddress, byte data ) { Wire.beginTransmission(deviceaddress); Wire.write((int)(eeaddress >> 8)); // MSB Wire.write((int)(eeaddress & 0xFF)); // LSB Wire.write(data); Wire.endTransmission(); delay(5); // Writing takes time } byte readEEPROM(int deviceaddress, unsigned long eeaddress ) { byte rdata; Wire.beginTransmission(deviceaddress); Wire.write((int)(eeaddress >> 8)); // MSB Wire.write((int)(eeaddress & 0xFF)); // LSB Wire.endTransmission(); Wire.requestFrom(deviceaddress,1); if (Wire.available()) rdata = Wire.read(); return rdata; } void loop() { // Not used }  
  10. Like
    bluehash reacted to Clavier in Sending data via USB to another USB   
    The G2553 chip itself does not have USB support. You can go through the LaunchPad's "application"/"backchannel" UART; you firmware then just needs to write/read the UART. You also need an application on the host PC to read from one COM port and write to another.
    But why use USB? Why can't you control the solenoid directly from the LaunchPad?
  11. Like
    bluehash reacted to JRDavisUF in driverlib crc32 problem   
    Thanks for the ideas.  Energia uses the WDT for other purposes, as such I didn't put it in my code.  However, I just stuck it in and that doesn't help.  I did try getting rid of the MAP_ stuff and that didn't help either.  I also noticed that the example defined the returned crc value as volatile, so I changed that, but it didn't help either.
    I missed the 1-clock cycle note.  As such, I changed my 1 microsecond delay to a 1 cycle delay and the code works fine.  I'm guessing that must be the issue. 
  12. Like
    bluehash reacted to nickds1 in driverlib crc32 problem   
    I highly doubt that this is an HW issue, though it's possible.... lets start with the code...
    Is the Watchdog timer still running? You've not stopped it (though I don't use Energia and don't know if it's stopped by default)..
    The code you provided is a bit messy, but is essentially the same as in the driverlib manual, and looks OK, except the WDT is on.
    As this seems to be a timing-sensitive issue, I'd start by stopping the WDT.
  13. Like
    bluehash reacted to chicken in driverlib crc32 problem   
    I wonder if there's some aggressive compiler optimization going on. The compiler wouldn't know what's happening inside the ROM functions and may put function calls out of order. Maybe worth a try to see if it works with straight calls to the driver lib (i.e. dropping the MAP_ prefix).
    PS: The reference manual says, that CRC result is available after 1 clock cycle. Also no mention of CRC issues in the errata.
  14. Like
    bluehash reacted to JRDavisUF in Using RTC_C alarm and WiFi at the same time   
    FWIW, I did figure out why my RTC clock accuracy was so bad.  By default, the RTC clock sources the internal 32k crystal, not the external LFXT as BCLK.  As such, to get it to work:
    1) Define frequency of LFXT to 32k:   MAP_CS_setExternalClockSourceFrequency(32768, 48000000); // LF, HF
    (why energia doesn't do this already, I don't know.  I see how starting it might consume power unnecessarily, but why not set the value atleast???)
    This step might not be needed, but since I wanted to query my clock speeds later, I added it.
    2) Turn on LFXT (I loop on this since it doesn't always take):  bool status = MAP_CS_startLFXTWithTimeout(CS_LFXT_DRIVE3, 10);
    3) Tell the RTC to use LFXT:  MAP_CS_initClockSignal(CS_BCLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1);
    With my msp432 launchpad, this gives me about 5ppm  (testing every 15s for about 2 weeks).
    Hope this helps anyone else who might have had issues...
    PS  Of course, you probably don't need to use the MAP_ versions...but I figured why not
    PPS  This is how I was getting my actual clock speeds...ie, why I added step 1.
        // Get the values
        uint32_t aclk   = MAP_CS_getACLK();
        uint32_t mclk   = MAP_CS_getMCLK();
        uint32_t smclk  = MAP_CS_getSMCLK();
        uint32_t hsmclk = MAP_CS_getHSMCLK();
        uint32_t bclk   = MAP_CS_getBCLK();
  15. Like
    bluehash reacted to nickds1 in Easy way to monitor peak stack usage...   
    I needed a way to see how much of my C++ stack was being consumed in my MSP application - the traditional way is to "poison" the stack with a known pattern, and then to see how much of it gets burnt away.
    So I wrote the following - hope folk find it useful:
    The following code allows you to simply do this and to check at any point how much of the pre-allocated stack was consumed during peak usage, i.e. how close your app got to the bottom of the stack, or indeed, whether it over-ran. The TI CCS documentation is completely wrong in the names it gives for the global symbols that define the size and start of the stack - needs to be updated,
    Stick this code (or similar) wherever you want to report on/check stack usage <smallest number of byes left free on the stack since initialisation>/<configured size of the stack>.
    #if defined(STACK_CHECK) std::printf( "Stack: %d/%d\n", stackMinFreeCount(), stackMaxSize() ); #endif and then, in your main code you need to poison the stack as early as possible and then define the reporting routines: // Define STACK_CHECK to include stack usage diagnostics #define STACK_CHECK #if defined(STACK_CHECK) #define STACK_INIT 0xBEEF // Pattern to use to initially poison the stack extern uint16_t _stack; // Start of stack (low address) uint16_t stackMinFreeCount(void); uint16_t stackMaxSize(void); #endif #if defined(__cplusplus) extern "C" { #endif #if defined(__TI_COMPILER_VERSION__) || \ defined(__GNUC__) int _system_pre_init( void ) #elif defined(__IAR_SYSTEMS_ICC__) int __low_level_init( void ) #endif { //... stuff... #if defined(STACK_CHECK) // // Poison the stack, word by word, with a defined pattern // // Note that _system_pre_init is the earliest that we can // do this and that it may not be possible in TI-RTOS // // When we call the __get_SP_register intrinsic (same on IAR & CCS), it will return the address // of the RET address for the caller of this routine. Make sure that we don't trash it!! // register uint16_t *stack = &_stack; // Address of lowest address in .stack section register uint16_t *stack_top = reinterpret_cast<uint16_t *>(__get_SP_register()); do { *stack++ = STACK_INIT; // Poison stack addresses } while (stack < stack_top); // Stop before top of stack to leave RET address #endif return 1; } #if defined(__cplusplus) } #endif #if defined(STACK_CHECK) /** * Check how deep the stack usage has been * * \return \c uint16_t Minimum number of bytes to bottom of stack */ extern uint16_t __STACK_END; // End of data extern uint16_t __STACK_SIZE; // Linker-set size of stack uint16_t stackMinFreeCount(void) { const uint16_t *stack = &_stack; uint16_t freeCount = 0; while (*stack == STACK_INIT && stack++ <= &__STACK_END) { freeCount++; } return freeCount << 1; } /** * Return size of C++ stack * * Set by the linker --stack_size option * * \return \c uint16_t Configued maximum size of the stack in bytes */ uint16_t stackMaxSize(void) { return static_cast<uint16_t>( _symval(&__STACK_SIZE) ); } #endif int main(void) { ... stuff #if defined(STACK_CHECK) std::printf( "Stack: %d/%d\n", stackMinFreeCount(), stackMaxSize() ); #endif ...stuff }  
  16. Like
    bluehash reacted to maximlee in Use of enum variables in .h and .c   
    Thank you.
    I am sorry for my late answer - I tried to change the code and compile it, but due to other errors couldn't do that. Anyway, I think that my problem was also related to code writing rather then enum mistakes: I was able today to compile the code.
    My lcd_send_string(* char) function was declared in a functions.h file as following:
    char *enum2str(enum IOchannel); #ifdef LCD void lcd_init(void); void lcd_send_string(char *s); #endif while LCD was defined in another definitions.h file:
    #define LCD LCD4 I had to comment #ifdef and #endif, and then everything compiled succesfully, including that function with enums: lcd_send_string(enum2str(haltIn)).
  17. Like
    bluehash reacted to mavro12345 in "Blinky" fails to compile   
    well, I had the same trouble. it was fixed by the following lines:
    sudo apt-get install libc6:i386 libx11-6:i386 libasound2:i386 libatk1.0-0:i386 libcairo2:i386 libcups2:i386 libdbus-glib-1-2:i386 libgconf-2-4:i386 libgdk-pixbuf2.0-0:i386 libgtk-3-0:i386 libice6:i386 libncurses5:i386 libsm6:i386 liborbit2:i386 libudev1:i386 libusb-0.1-4:i386 libstdc++6:i386 libxt6:i386 libxtst6:i386 libgnomeui-0:i386 libusb-1.0-0-dev:i386 libcanberra-gtk-module:i386
    sudo ln -s /lib/i386-linux-gnu/libudev.so.1 /lib/libudev.so.0
    As the previous response, it ws related to the Code Composer Studio Installation, those lines are taken from
  18. Like
    bluehash reacted to energia in Delayed start MSP430FR5969   
    Are you using Energia? If yes, then there is indeed a delay. This is due to the startup code figuring out what clock source to use for low power modes.
    Details can be found in enableXtal() in wiring.c.
  19. Like
    bluehash reacted to Fmilburn in Trouble Energia 17 Windows 10 msp430g2   
    Hi @@osmanfish and welcome to 43oh,
    Irritating isn't it?  It can be caused by several things.  It can happen with the MSP430G2 and Energia if you are using serial print and close the serial monitor down while the sketch is printing.  This does not seem to happen with other LaunchPads.  Try unplugging the LaunchPad at the computer and then plug it back in.  You may have to try uploading one or more times to get it working again.  Also, avoid shutting down the serial window.  Flash (upload) the target chip without shutting the serial monitor.
    If this does not seem to be your problem then google "Could not find MSP-FET430UIF on specified COM port (error = 57)" and you will find a number of other possible causes.  Look on the TI e2e site.
  20. Like
    bluehash reacted to energia in Where do I find the Script that runs after clicking Upload   
    What you could do is build Energia from source. You can then change the upload command in https://github.com/energia/Energia/blob/master/app/src/processing/app/debug/MSP430Uploader.java.
  21. Like
    bluehash reacted to 89383836620029234943 in Hello from TX   
    I'll update my status. I downloaded Energia again with no change. However I was successful when I tried a different USB port.
    Looks like I can get going now!
  22. Like
    bluehash reacted to brelliott18 in I2C - MSP430 to MSP430 problems   
    using Mods as above plus twi.c and twi.sw.c  from this link :-
    plus adding :-
    Wire.setModule (0)  before Wire.begin() in Void Setup() in both Master and Slave :-
    I have managed to send two characters from the Master to turn off the Red Led in a loop on the Slave.
     BIG Thanks again to B@TTO.
    Wouldn't it be perhaps a good idea if these files were updated and placed in the Energia GitHub Repository ?  How is this process carried out ?
  23. Like
    bluehash got a reaction from dubnet in Atomo Modular Electronics System - Raspberry-pi   
    Cool concept to adding boards to the Raspberry Pi.
    Atomo is a complete system for building electronic things with four parts: Control, IO, Power, and Connector. 
  24. Like
    bluehash reacted to zeke in Implementing an I2C slave device.   
    This is my approach to state machines. Your mileage may vary.
    Determine all of the sub-systems that you will want to service Commands, Controls and Inputs, User Interface, and Data Setup a system tick timer that fires its interrupt on a regular consistent basis. This system doesn't have to go into LPM4. If it does then periodically wake up the system and cycle through the software service loops then go back to sleep. Setup a series of service flags that are set during the interrupt service routine and cleared after being serviced: Flag(s) for Commands, Flag(s) for Controls and Inputs, Flag(s) for User Interface, and Flag(s) for Data Setup a variable that acts like the system timer odometer. Every Odometer == (DesiredInterval%ServiceFlag_n_now) set the ServiceFlag_n Decide how often you will service the other functional blocks of your code. For example, Update the 2x20 LCD display every one second, or Update the Serial Console every 250ms, or Retrieve the Temperature from a sensor every 15 minutes. Setup an Interrupt Service Routine to catch any characters coming into the Serial Port Buffer. Stuff them into the Input Ring Buffer Set a flag that there's something to service. In the main loop, scan all of the service flags to see if any are set. Call the servicing function for each set flag. Clear the service flag at the end of that process. Configure the program to repeat continuously until Kingdom Come.
    I've left out significant details about setting up all of the peripherals and general variables so don't forget to do that stuff.
    This is just the basic gist of my state machines on a bare metal level.
  25. Like
    bluehash reacted to cameron in Eagle Library for CC1310   
    @ykaradana I will upload an EAGLE library for the CC1310 here to help anyone who needs this in the future. Specifically, it is the 128RHB version, but obviously it will work with any of the RHB variations. Hope it helps you.
  • Create New...