Moving from MSP432 to STM32 - Page 1
Forum section: electronics / general

author: thegoof121
author_rank: Newbie
timestamp: March 12, 2017, 09:50:38 pm
content: Hi,I am a student and have been using the MSP432 for a number of small hobby projects recently. I'm interested in moving over to the STM32F boards, since they seem to be more popular in the online community. Unfortunately, I'm having a really hard time getting started, as I can't quite get my head around CubeMX, and STM's documentation is poor compared to what I've grown accustomed to from TI.Does any one have a good link to a book or an online tutorial that slowly acclimates someone to the STM32 board, while pointing out the relevant STM resources and where to find them/how to find them?One of the things I've noticed about STM is there seems to be lots of options on the software side, whether you want to use their HAL, the SPI, or even something like Chibi, but as a beginner all these competing choices are adding to my confusion and throwing me off.

author: martinayotte
author_rank: Regular Contributor
timestamp: March 12, 2017, 09:58:35 pm
content: If you wish to start smootly with STM32 without having too much to learn about HAL/SPL/CubeMX, etc., simply take a look athttp://www.stm32duino.com.

author: westfw
author_rank: Super Contributor
timestamp: March 13, 2017, 10:14:40 am
content: Huh. I guess you can add this as an example of why you should avoid vendor libraries - they are distinctly NOT PORTABLE to other vendors. I mean, the raw hardware code isn't portable either, but in many ways it can wind up being more generally applicable than library code... (sad commentary!)(For some reason, this was always more obvious to me at the OS level. ie, my interest in TI-RTOS is almost nil, because I wouldn't want to write any "above-OS" level code that was that tied to a particular vendor.)The STM32 has been discussed a lot in these forums.Several people have recommendedhttp://www.carminenoviello.com/mastering-stm32/

author: julianhigginson
author_rank: Frequent Contributor
timestamp: March 13, 2017, 07:10:07 pm
content: why do you need to move? if you like the ti offering, and you can use it, why not just keep going? St cube is interesting, but maybe you want to try just using the hal code to start?do you have any particular interests or hobbies that you might be able to find any related open source stm32 projects to play with?Sent from my A0001 using Tapatalk

author: suicidaleggroll
author_rank: Super Contributor
timestamp: March 13, 2017, 07:33:43 pm
content: Quote from: julianhigginson on March 13, 2017, 07:10:07 pmAgreed. You probably aren't seeing as much about the MSP432 because they areBRANDnew, been shipping for less than a year. It'll take time for them to infiltrate the market as much as the STM32 and other offerings have.

author: trevwhite
author_rank: Frequent Contributor
timestamp: March 13, 2017, 10:02:31 pm
content: I have found that Atollic has very nice support for the STM32 dev boards. I have recently started working the STM32 and I installed Atollic, looked at the sample/example projects and bought dev boards that the examples were written for. I then was able to work through the examples and get the core stuff up and running pretty painlessly. This was a big help in getting used to STM32 environment.

author: westfw
author_rank: Super Contributor
timestamp: March 13, 2017, 11:35:53 pm
content: QuoteSurely not... (checks) I bought my first MSP432 Launch pad TWO years ago...The biggest thing going for ST is variety. M0+, M3, M4, and M7 microcontrollers in a wide variety of packages, peripherals, and memory configurations. MSP432 is one core, two memory choices, and two packages. Adding Tiva gives a few more choices, but nothing close to the ST lineup.(OTOH, some of that is "we have the best core and all the features you could possibly want at a great price; why would you want anything less?")

author: suicidaleggroll
author_rank: Super Contributor
timestamp: March 14, 2017, 12:12:52 am
content: Quote from: westfw on March 13, 2017, 11:35:53 pmBeta silicon and in launchpad form only. They didn't move to production silicon and start shipping ICs to distributors until the middle of last year. Earliest I actually saw the ICs available and in stock on Digikey or Mouser was ~November last year (5 months ago).

author: timb
author_rank: Super Contributor
timestamp: March 14, 2017, 12:27:08 am
content: Quote from: westfw on March 13, 2017, 11:35:53 pmCheck the chip on your LaunchPad and I think you'll find it's actually an XSP432, not an MSP432.Also, if you bought the MSP432 LaunchPad within the first 6 months of release, they owe you a free replacement with a real, non-beta chip on it.

author: andyturk
author_rank: Frequent Contributor
timestamp: March 14, 2017, 12:59:33 am
content: Quote from: timb on March 14, 2017, 12:27:08 amThat's the great thing about TI... If they ship non-working silicon, they'll own up to it and send you new parts. Heck, they'll even re-spin mcus with a new part number if you find a particularly heinous bug in the system ROM. TI is awesome that way!</sarcasm>PS. DAMHIK.

author: thegoof121
author_rank: Newbie
timestamp: March 14, 2017, 03:23:44 am
content: Thanks for all the responses guys. I'll have a look at Mastering STM32 book.I'm interested in picking up the STM32 largely because I see them used more. I keep forgetting the MSP432 are so new. They basically launched the same time I started looking seriously at ARM chips. I'm mainly learning this stuff for fun and to expand my horizons.It sounds like STM doesn't have some magical place for docs like TI has with Resource Explorer. Honestly, the quality of TI's Resource Explorer makes me want to pay extra for their parts, just for the good documentation and examples.I did find the CubeMX examples last night after I posted this, but the examples don't cover all of the peripherals, which is disappointing compared to TI.

author: westfw
author_rank: Super Contributor
timestamp: March 14, 2017, 03:50:06 am
content: QuoteHmph. Really? You'd think they would have let me know! (They were ordered direct from TI...)

author: newbrain
author_rank: Super Contributor
timestamp: March 14, 2017, 12:21:43 pm
content: Quote from: thegoof121 on March 12, 2017, 09:50:38 pmAs a hobbyist, I prefer STM32s, and frankly found TI documentation and SWunderwhelming, but to each their own (things might have improved in the meantime).One of the advantages of STM32s over MSP432, in addition to the extra wide range of cores, packages and cheap(ish) development boards, is that most of the I/Os are 5V tolerant.CubeMXis the initialization code generator, it will download the right Cube (library source) for your MCU(s).Inside the Cube, there are lots of examples projects; the full spectrum of peripherals might be distributed on more than one board...usually the EVAL boards have more examples than the Nucleo ones.Which peripherals examples were you missing?Noviello's book is highly regarded, and from the online sample it appears to be well written, so that's for sure good advice.I just went from the reference manuals, the schematic of my board (F429 DISCO), and the examples...The effort of setting up the whole toolchain manually, as described in the book, is definitely educative, I just went for a prepackaged IDE (many free and non free -but reasonable- alternatives) but that's up to your preferences.The HAL is large (bloated is the most used adjective in this forum), but I still find it useful for complex peripherals: I'm not going to write my own USB stack.Some of the cores also support the LL (low layer) library, and code generation in CubeMX is being added: their advantage over direct register manipulation would not appear to be much, but I have limited experience with them.Quote from: westfw on March 14, 2017, 03:50:06 amSame here, I have got two with the beta chip: XSP432, the one with the Encyclopedia Britannica as errata!Is there a procedure to follow? Somewhere where this is stated? Or is that pulling sensation in my leg justified?

author: mbless
author_rank: Regular Contributor
timestamp: March 14, 2017, 06:32:30 pm
content: I can comment on Mastering STM32 book as I bought it. It has been absolutely indispensable for me since I haven't done anything this complicated before. I started out with hobbyist electronics 6 months ago with a Picaxe, then moved to Arduino with some embedded 8bit Atmels. I am now testing a BLDC motor driver with an embedded STM32F4 I designed.This won't be applicable to you, but when I decided to make the switch from 8bit to 32bit, I was quite overwhelmed with all the choices for IDEs, debuggers, toolchains, etc. That's when I decided to buy Mastering STM32 because he walks through the installation of all the necessary parts for Windows, Mac and Linux. Noviello uses Eclipse with the GNU arm eclipse plugin with the GCC arm toolchain. (I don't know any other IDEs besides Arduino, so I can't comment on its abilities.) There are examples for almost all of the chapters available on Noviello's github, which is nice. He also uses Nucleo dev boards for everything, so that's what I used.You can get a chapter list for the book on the publisher's website, but I think it covers all of the basic peripherals. There are working example codes showing how to implement the HAL commands, and typically there are examples showing how to setup CubeMX.P.S. I'm not associated with Carmine at all, I'm just a happy hobbyist who was able to get started in STM32 quickly with the book.

author: timb
author_rank: Super Contributor
timestamp: March 14, 2017, 08:31:48 pm
content: Quote from: westfw on March 14, 2017, 03:50:06 amQuote from: newbrain on March 14, 2017, 12:21:43 pmMy bad, I think I'm actually mixing up the MSP432 LaunchPad with the MSP430 Wolverine FRAM LaunchPad.In that case they emailed me when the silicon went production, saying I'd get a coupon code for a free production version. I never got the code, so 6 months later I got in contact with them and they and sent me one, free of charge.There were some major changes to that LP, including the debugger portion, so I think that's why they did that.