Jump to content
43oh

Peabody

Members
  • Content Count

    42
  • Joined

  • Last visited

  • Days Won

    11

Reputation Activity

  1. Thanks
    Peabody got a reaction from jazz in Modified BSL-Scripter for Windows now works with FTDI and other USB-to-UART adapters   
    A new WIN32 version of BSL-Scripter.exe has been compiled which allows BSL flashing using generic USB-to-UART adapters such as the FT232, CP2102 and CH430 as the hardware interface.  It can be used with MSP430 F5xx F6xx, and FRxx parts with UART BSL.
    This version has a new MODE line option "INVOKE", which causes Scripter to directly generate the BSL hardware invocation sequence on the adapter's DTR and RTS outputs, which in turn are connected to the /Reset and Test pins on the target device.  It produces the pattern shown in Figure 2 of slau319w.pdf and slau550s.pdf, which is normally generated by the Rocket or MSP-FET.  If the INVOKE option is used, you must include the PARITY option as well.
    I have successfully tested the new Scripter on an MSP430FR2311 using all three adapter types.  It would be helpful if others could test other relevant MSP430 parts and report the results.
    This has finally come about as a result of the generous efforts nagaokanchi, also known as "drcrane" on Github, who not only got TI's source code to compile with new versions of all the dependencies, but also navigated the mysteries of BOOST to control the DTR and RTS lines.  The new Scripter and a related Instructions file are contained in "BSL-Scripter-v3.4.1.zip" in the Releases folder of his repository, which also contains the source code:
    https://github.com/drcrane/bslscripter-vs2017/releases
    For those who must run an official TI version of Scripter, I will leave on my Github the now-deprecated kludge option for using these adapters with the official Scripter, but of course it requires either manual intervention or an additional circuit:
    https://github.com/gbhug5a/CP2102-with-BSL-Scripter-for-MSP430
    And finally, a reminder that the older MSP430 parts which use BSLDEMO2 for flashing, including the F1xx, F2xx, F4xx, and G2xx parts with BSL, can also be flashed with these adapters if a modified version of BSLDEMO is used, such as the "BSLDEMO-2.01C.exe" found in my other repo:
    https://github.com/gbhug5a/MSP430-BSL
    Texas Instruments has neither reviewed nor approved any of this. But I continue to hope TI will officially make similar changes to BSL-Scripter and BSLDEMO to support the use of these generic adapters.
     



  2. Like
    Peabody got a reaction from zeke in Places we buy things...   
    I'm in the US, and I've generally had good results with Banggood.  Their products are pretty much the same as you would find on Ebay, but they appear to care about customer service, at least in my experience.  The biggest issue for me has been shipping.  On two occasions I've paid a higher price to get something from the US warehouse, thinking that shipping would be much faster.  But that hasn't worked.  The last time I ordered, the items from China arrived before the US items, which took 18 days via DHL.  I've become a real non-fan of US domestic DHL.  They are much slower than anyone else.  I mean, 18 days.  There's no excuse for that.
    I don't know what shipping and customs problems you will have in Canada.  Maybe someone else can advise you on that.  But with regard to the products, I would generally feel comfortable with Banggood.  Of course it depends on how much you're going to spend. 
  3. Thanks
    Peabody got a reaction from jazz in Multiplexing 7-segment displays by segment   
    In case it might be of use to someone, I've posted a Youtube video and created a Github repo dealing with an alternate way of multiplexing 7-segment displays that has a greatly reduced parts count.  It's multiplexing by segment instead of by digit.  The video shows this method implemented with an MSP430G2553.  The Github repo has demonstration Arduino Nano sketches, but they should work as-is with Energia except for the pin assignments.  The video is on my local OSH group's channel, and I can't respond to comments there, but will answer questions here if there are any.
    https://www.youtube.com/watch?v=8w09Zy8MQrc
    https://github.com/gbhug5a/7-Segment-Displays-Multiplex-by-Segment
  4. Thanks
    Peabody got a reaction from Fmilburn in Multiplexing 7-segment displays by segment   
    In case it might be of use to someone, I've posted a Youtube video and created a Github repo dealing with an alternate way of multiplexing 7-segment displays that has a greatly reduced parts count.  It's multiplexing by segment instead of by digit.  The video shows this method implemented with an MSP430G2553.  The Github repo has demonstration Arduino Nano sketches, but they should work as-is with Energia except for the pin assignments.  The video is on my local OSH group's channel, and I can't respond to comments there, but will answer questions here if there are any.
    https://www.youtube.com/watch?v=8w09Zy8MQrc
    https://github.com/gbhug5a/7-Segment-Displays-Multiplex-by-Segment
  5. Like
    Peabody got a reaction from bluehash in Using a CP2102 with BSL-Scripter   
    I don't know if this has any application for Energia, but might be of use to someone at some point.
    I've been working on a way to embed a generic USB-to-UART adapter like the CP2102, FT232 or CH340 in an MSP340 project so firmware can be updated without having to buy a Launchpad.  The newer MSP430 parts presented a problem because BSL-Scripter, TI's software for BSL flashing for those parts, doesn't transmit the special invoke pattern on /Reset and Test.  Instead, it just brings both lines low, which messes things up.
    I gave up on trying to recompile Scripter, but I've written a Windows program that generates the pattern, and developed  methods to disconnect DTR from /Reset after the pattern has invoked BSL, but before BSL-Scripter is run, which allows flashing to proceed with /Reset high.  A full explanation, source code, executable, and schematic are in my Github repo.  It all seems to work, at least with an FR2311 under Windows 7.
    https://github.com/gbhug5a/CP2102-with-BSL-Scripter-for-MSP430
     
  6. Thanks
    Peabody got a reaction from Fmilburn in New polling and pin-interrupt routines for rotary encoders   
    I've added a second PDF file describing an efficient polling routine for servicing multiple momentary push-button switches.
     
  7. Thanks
    Peabody got a reaction from Frida in New polling and pin-interrupt routines for rotary encoders   
    I worked on a new servicing routine for my kit oscilloscope's quadrature rotary encoder, and decided to write it all up and post it on Github.  Included are routines for periodic polling and for pin-interrupt servicing.  Hardware switch debouncing is not needed.  The routines are for general use, but I wrote testing code for the MSP430G2231 installed on the Launchpad.  The scope guys have used the "lookup table" state transition routine that most people use today, but it doesn't work very well on the scope, and I haven't found it to work very well generally.  My routines are designed to avoid all effects of switch bouncing, and seem to work very well and efficiently.
    Everything is explained in the PDF file in the repo.  All the testing code is also included, both source code and executable hex files, and I'm afraid it's all in assembler.  But I hope it wouldn't be too difficult to create Energia versions if anyone is interested.  I've provided hex files for both types of encoders - those with the same number of pulses as detents per revolution, and those with half as many pulses as detents.  The code produces one "tick" per detent in both cases.
    https://github.com/gbhug5a/Rotary-Encoder-Servicing-Routines
     
     
  8. Thanks
    Peabody got a reaction from Fmilburn in New polling and pin-interrupt routines for rotary encoders   
    I worked on a new servicing routine for my kit oscilloscope's quadrature rotary encoder, and decided to write it all up and post it on Github.  Included are routines for periodic polling and for pin-interrupt servicing.  Hardware switch debouncing is not needed.  The routines are for general use, but I wrote testing code for the MSP430G2231 installed on the Launchpad.  The scope guys have used the "lookup table" state transition routine that most people use today, but it doesn't work very well on the scope, and I haven't found it to work very well generally.  My routines are designed to avoid all effects of switch bouncing, and seem to work very well and efficiently.
    Everything is explained in the PDF file in the repo.  All the testing code is also included, both source code and executable hex files, and I'm afraid it's all in assembler.  But I hope it wouldn't be too difficult to create Energia versions if anyone is interested.  I've provided hex files for both types of encoders - those with the same number of pulses as detents per revolution, and those with half as many pulses as detents.  The code produces one "tick" per detent in both cases.
    https://github.com/gbhug5a/Rotary-Encoder-Servicing-Routines
     
     
  9. Thanks
    Peabody got a reaction from veryalive in New polling and pin-interrupt routines for rotary encoders   
    I worked on a new servicing routine for my kit oscilloscope's quadrature rotary encoder, and decided to write it all up and post it on Github.  Included are routines for periodic polling and for pin-interrupt servicing.  Hardware switch debouncing is not needed.  The routines are for general use, but I wrote testing code for the MSP430G2231 installed on the Launchpad.  The scope guys have used the "lookup table" state transition routine that most people use today, but it doesn't work very well on the scope, and I haven't found it to work very well generally.  My routines are designed to avoid all effects of switch bouncing, and seem to work very well and efficiently.
    Everything is explained in the PDF file in the repo.  All the testing code is also included, both source code and executable hex files, and I'm afraid it's all in assembler.  But I hope it wouldn't be too difficult to create Energia versions if anyone is interested.  I've provided hex files for both types of encoders - those with the same number of pulses as detents per revolution, and those with half as many pulses as detents.  The code produces one "tick" per detent in both cases.
    https://github.com/gbhug5a/Rotary-Encoder-Servicing-Routines
     
     
  10. Like
    Peabody got a reaction from agaelema in BSL for G2553 and G2231 using embedded USB-Serial adapter   
    I originally posted about this in October, but wanted to report that I've updated the G2553 special BSL entry code to fix a bug.  Everything is included in my Github repository:
    https://github.com/gbhug5a/MSP430-BSL
    To review,  this project deals with the MSP430G Value Line processors, and was prompted by the idea of embedding a CP2102 USB-to-Serial adapter in a project's circuit rather than hooking one up through a pin header, or using the Launchpad for JTAG flashing.  So all you would need to flash new firmware is a USB cable and the right software.  A detailed description of what's involved is in the long-winded PDF file.  The PDF deals with the much-despised BSL password in the G2553 ROM-based BSL, and offers a couple ways around it, including special boot code that fits entirely in the INFOA segment along with the existing calibration data, and lets you run BSL with INFOA protected from erasure, which means you can flash new firmware without knowing the password, and without erasing the calibration data.

    There's also a complete custom BSL system for the lowly G2231, which has no built-in BSL.  Included are installers for the chip and the PC software to drive the process.  And there's a discussion of circuit design for using embedded adapters or modules containing them.

    The installers for the chips use the Naken assembler, and the PC software uses the LCC compiler.  But the repo includes both the source code and the executables for everything, so assembler-phobes can just flash the hex files.

    There are two small bonuses - a VBScript for Windows that converts an IntelHex file to TI-TXT format, and as part of the BSL installation for the G2231, the calibration values for 8, 12 and 16 MHz are derived from the existing 1 MHz calibration value, with no crystal required, and saved in the usual places in INFOA (based on original work by Steve Gibson).

    I did the original work on this for a project, and decided I might as well write it up in case it might be useful to others at some point.  The Value Line processors are kinda old school now, but are still available in DIP, and are still pretty popular.  And the circuit design portion may be more generally useful.

    Of course I'd like to know about any bugs or errors anyone may find.  Hope this will be useful.


  11. Like
    Peabody got a reaction from jazz in BSL for G2553 and G2231 using embedded USB-Serial adapter   
    I originally posted about this in October, but wanted to report that I've updated the G2553 special BSL entry code to fix a bug.  Everything is included in my Github repository:
    https://github.com/gbhug5a/MSP430-BSL
    To review,  this project deals with the MSP430G Value Line processors, and was prompted by the idea of embedding a CP2102 USB-to-Serial adapter in a project's circuit rather than hooking one up through a pin header, or using the Launchpad for JTAG flashing.  So all you would need to flash new firmware is a USB cable and the right software.  A detailed description of what's involved is in the long-winded PDF file.  The PDF deals with the much-despised BSL password in the G2553 ROM-based BSL, and offers a couple ways around it, including special boot code that fits entirely in the INFOA segment along with the existing calibration data, and lets you run BSL with INFOA protected from erasure, which means you can flash new firmware without knowing the password, and without erasing the calibration data.

    There's also a complete custom BSL system for the lowly G2231, which has no built-in BSL.  Included are installers for the chip and the PC software to drive the process.  And there's a discussion of circuit design for using embedded adapters or modules containing them.

    The installers for the chips use the Naken assembler, and the PC software uses the LCC compiler.  But the repo includes both the source code and the executables for everything, so assembler-phobes can just flash the hex files.

    There are two small bonuses - a VBScript for Windows that converts an IntelHex file to TI-TXT format, and as part of the BSL installation for the G2231, the calibration values for 8, 12 and 16 MHz are derived from the existing 1 MHz calibration value, with no crystal required, and saved in the usual places in INFOA (based on original work by Steve Gibson).

    I did the original work on this for a project, and decided I might as well write it up in case it might be useful to others at some point.  The Value Line processors are kinda old school now, but are still available in DIP, and are still pretty popular.  And the circuit design portion may be more generally useful.

    Of course I'd like to know about any bugs or errors anyone may find.  Hope this will be useful.


  12. Like
    Peabody got a reaction from veryalive in BSL for G2553 and G2231 using embedded USB-Serial adapter   
    I originally posted about this in October, but wanted to report that I've updated the G2553 special BSL entry code to fix a bug.  Everything is included in my Github repository:
    https://github.com/gbhug5a/MSP430-BSL
    To review,  this project deals with the MSP430G Value Line processors, and was prompted by the idea of embedding a CP2102 USB-to-Serial adapter in a project's circuit rather than hooking one up through a pin header, or using the Launchpad for JTAG flashing.  So all you would need to flash new firmware is a USB cable and the right software.  A detailed description of what's involved is in the long-winded PDF file.  The PDF deals with the much-despised BSL password in the G2553 ROM-based BSL, and offers a couple ways around it, including special boot code that fits entirely in the INFOA segment along with the existing calibration data, and lets you run BSL with INFOA protected from erasure, which means you can flash new firmware without knowing the password, and without erasing the calibration data.

    There's also a complete custom BSL system for the lowly G2231, which has no built-in BSL.  Included are installers for the chip and the PC software to drive the process.  And there's a discussion of circuit design for using embedded adapters or modules containing them.

    The installers for the chips use the Naken assembler, and the PC software uses the LCC compiler.  But the repo includes both the source code and the executables for everything, so assembler-phobes can just flash the hex files.

    There are two small bonuses - a VBScript for Windows that converts an IntelHex file to TI-TXT format, and as part of the BSL installation for the G2231, the calibration values for 8, 12 and 16 MHz are derived from the existing 1 MHz calibration value, with no crystal required, and saved in the usual places in INFOA (based on original work by Steve Gibson).

    I did the original work on this for a project, and decided I might as well write it up in case it might be useful to others at some point.  The Value Line processors are kinda old school now, but are still available in DIP, and are still pretty popular.  And the circuit design portion may be more generally useful.

    Of course I'd like to know about any bugs or errors anyone may find.  Hope this will be useful.


  13. Like
    Peabody got a reaction from jazz in BSL for G2553 and G2231 using embedded USB-Serial adapter   
    Last summer I worked on the idea of embedding a USB-to-Serial adapter in Value Line projects so firmware revisions could be done with only a USB cable and the right software, without needing a Launchpad.  The adapter chips and modules containing them are now so inexpensive that this makes sense.  On the chance that it might be useful to someone, I've written it all up and posted it to Github:
    https://github.com/gbhug5a/MSP430-BSL
    The project is summarized in the README, and explained in detail, with needed software and hardware, in the PDF.
     
  14. Like
    Peabody got a reaction from zeke 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.
     
     
     
  15. Like
    Peabody got a reaction from bluehash 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.
     
     
     
×
×
  • Create New...