STM8L-Discovery: Separating the programmer - Page 1
Forum section: electronics / general

author: ju1ce
author_rank: Regular Contributor
timestamp: July 10, 2012, 06:48:28 am
content: Has anyone tried to separate (physically, using a saw) the programmer from the rest of the STM8L-DISCOVERY board? Of course, then I would have to supply the power myself, but are there any other things I should take into account? I think it should just work...I'm asking this because I need the LCD to be near the top of the enclosure board in a project and I can't be bothered to brew my own board yet.

author: ju1ce
author_rank: Regular Contributor
timestamp: July 13, 2012, 10:44:12 am
content: I guess no one has this board. I'll order one from Mouser tonight and report back here when I get it (if I remember).It looks like a very nice chip with an ADC, DAC and LCD interface.

author: hans
author_rank: Super Contributor
timestamp: July 13, 2012, 11:50:14 am
content: Like all STM boards, can't you remove the jumpers + 2 wires?I guess you can cut from the display, if you were really going for a smaller form factor.The power supply is probably on the programmer side though, as that's where the power enters. I also see a SOT223 device next the jumpers, so that's probably the 3.3V rail.Well, if it works, I think you can use the SWD output from the ST-Link for programming any ST device. So that would be quite convenient.

author: bingo600
author_rank: Super Contributor
timestamp: July 13, 2012, 07:01:08 pm
content: I wonder why a STM8L-Discovery is interesting ....Custom $$ compiler & non-32bit cpu.I'd select aSTM32L-Discovery - Arm CortexM3Free Compiler & 32-BitBoth seems to have onboard LCD/Bingo

author: T4P
author_rank: Super Contributor
timestamp: July 13, 2012, 07:09:40 pm
content: ...i was "lectured" by another person on this forum some time ago that,8 bit is faster for bitbangingAnd apparently the STM8L is the king of the 8bit market

author: ju1ce
author_rank: Regular Contributor
timestamp: July 13, 2012, 07:32:04 pm
content: Quote from: bingo600 on July 13, 2012, 07:01:08 pmWell it depends. I'm making a dummy load (one-off), where the current setting is given by the DAC and the current is shown on the LCD. I may also add a few I2C devices like a temperature sensor and a keypad, but even then a compiler with a size limit will suffice.In this case a 32-bit cpu wouldn't add any extra value, so I decided to stick with a 8-bit cpu because I'm used to them and they are generally simpler.

author: Bored@Work
author_rank: Super Contributor
timestamp: July 13, 2012, 07:33:51 pm
content: I digged one out of the junk bin at work (where all our ST boards live). It was marked as MB915-B00. It didn't power up so I couldn't conduct a live saw experiment. But from a quick inspection, there doesn't seem to be an official "cut here" line between the display and the programmer. There is a little bit of space, but it is used, for example, by a horizontal traces.Anyway, STs eval licene is rather restrictive when it comes to using the eval board in some producr setup. Read it for a good laugh end hen move on to another manufacturer.:By the way, there is an attempt at an open source compiler for the 7 and 8 ST MCUs. When we looked at it, it was unusable. And as we have learned, ST won't give open source compiler developers a helping hand. Despising open source and thinking throwing cheap eval boards at the masses is enough to win the hearts and minds over.

author: McMonster
author_rank: Frequent Contributor
timestamp: July 14, 2012, 02:53:45 pm
content: Quote from: Bored@Work on July 13, 2012, 07:33:51 pmSame thoughts here. I considered buying one just to see how a different 8-bit micro would work, but couldn't find any compiler that does not limit the code size etc. (or maybe I missed something?). Lack of open source support for the platform won't attract many hobbyists. TI makes the same error with MSP430, great micros, but no support for open source tools, but at least they are there.

author: T4P
author_rank: Super Contributor
timestamp: July 14, 2012, 05:54:39 pm
content: It's depressing, it really is.If not for the fact that i have access to IAR, i would not have tried out a STM32F4-Disco

author: McMonster
author_rank: Frequent Contributor
timestamp: July 14, 2012, 06:42:58 pm
content: Things are different with ARMs, there good and free toolchains, there's OpenOCD for debugging and it's all relatively easy to set up in Eclipse or any other environment you like. I have two ARM dev boards (STM32F4 Discovery and a STM32F107 based board) and I don't have any problems programming and debugging them.

author: bingo600
author_rank: Super Contributor
timestamp: July 14, 2012, 06:50:35 pm
content: Quote from: McMonster on July 14, 2012, 02:53:45 pmThis i don't understand ....I have build several MSP430 GCC compilers , and there's also OSS support for the programmer @their 4.30$ little board.http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=720728#720728http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=756652#756652/Bingo

author: bingo600
author_rank: Super Contributor
timestamp: July 14, 2012, 06:54:31 pm
content: Quote from: ju1ce on July 13, 2012, 07:32:04 pmAfaik the STM8 is quite complex , as the IO looks a lot like ST's 32-bit arm'sBut i haven't tried one , i do have a few STM8VL-Discovery's.But just used the programmer part (ARM) , to convert to Versaloon Debugging dongle.I have never wanted to waste time on a mcu wo. a free compiler./Bingo

author: ju1ce
author_rank: Regular Contributor
timestamp: July 19, 2012, 09:14:19 pm
content: I tried it and it is definitely possible. You needn't rework any traces if you've got a saw with a blade thin enough. I had to rewire the reset line and connect the 3.3V line to the SWIM connector so that the target board can get power.Here's the board saying "Hello EEVBlog":

author: mrflibble
author_rank: Super Contributor
timestamp: July 21, 2012, 11:56:47 am
content: Quote from: bingo600 on July 14, 2012, 06:50:35 pmSame here. mspgcc + mspdebug works just fine.

author: mrflibble
author_rank: Super Contributor
timestamp: July 21, 2012, 12:02:10 pm
content: Quote from: ju1ce on July 19, 2012, 09:14:19 pmThat's using the STM8VL-Discovery? If so, then I just found another rationalization for buying one.I wonder if the same trick is going to work for a STM8S-Discovery. I'd guess yes, but has anyone here tried this?

author: ju1ce
author_rank: Regular Contributor
timestamp: July 21, 2012, 02:32:59 pm
content: Quote from: mrflibble on July 21, 2012, 12:02:10 pmIt's a STM8L-discovery (STM8VL-Discovery doesn't seem to exist; STM32VL-Discovery is of course a completely different beast). STM8S-Discovery can definitely be separated, it even has milled slots for easy snapping and it is mentioned in its manual.

author: mrflibble
author_rank: Super Contributor
timestamp: July 21, 2012, 02:44:59 pm
content: Sorry, STM8SVLDISCOVERY induced mixup there. And good to know about the STM8S-Discovery. Looks like an addition to the shopping list. And now I only hope setting up a toolchain for that is moderately less painful than for the STM32F4.

author: T4P
author_rank: Super Contributor
timestamp: July 21, 2012, 05:40:46 pm
content: Quote from: mrflibble on July 21, 2012, 02:44:59 pmIt is indeed painful. But that's what you throw away for raw power*PS: I saw a STM3210e for only 110USD somewhere, if you're interested and alsohttp://www.aliexpress.com/product-fm/601319176-Free-shipping-ARM-Cortex-M4-STM32-STM32F407-STM32F407IGT6-development-board-with-3-2-inch-LCD-display-wholesalers.html

author: hans
author_rank: Super Contributor
timestamp: July 21, 2012, 10:50:25 pm
content: Quote from: DaveXRT on July 13, 2012, 07:09:40 pmWhy is 8-bit faster for bitbanging?The bit size of a proccesor only means how big registers in the proccesor are. A 32-bit processor can easily work with bytes.For e.g. I have done SPI bitbanging on a PIC32 running at 80MHz. I was only able to analyze the signal (like SCK) if I put extra delays in the code (NULL commands) , otherwise the 50MHz tek scope @ college couldn't pick it up..I do give you though, that most ARM processors don't allow for quick I/O toggling because of their architecture. The new GPIO values have to propogate through all the AHB busses , matrices, switches etc. etc. , and will add considerable delays.Some MCU's support Fast GPIO where it's directly on the CPU bus. But typically fairly limited. However, if bit banging is too slow then try to use a peripheral (adapt SPI, I2C, camera, memory busses etc), it's much faster and you get DMA (if you need high throughput).Anyway, if you want to ditch IAR (which I probably am going to do), CooCox sounds like a great alternative:http://www.coocox.org/CooCox_CoIDE.htmIt's free to use.They support Cortex M4 and the STM32F4 too.I'm uncertain if the STM8 is a 'king' at all. Like I never actually looked into ST MCU's untill I saw the STM32F4 with a 7MSPS ADC (which I plan to use for a future project).Their 8-bit MCU's seem alright, but I don't see any advantage or disadvantage to using a modern PIC or an AVR.Well I guess having DMA and a 1MSPS ADC + DAC on such a low entry MCU is nice. Problem is, if the project doesn't need it, you still don't gain any advantageIn general, I'd rather ditch 8-bit completely and pick something 16-bit or even 32-bit all the time. Look at NXP Cortex m0 series, they are fast , lots of space and peripherals, one set of tools (Cortex m0 to m4), small (I believe there are some TSSOP and even DIP versions) and cheap (few dollars).

author: T4P
author_rank: Super Contributor
timestamp: July 22, 2012, 05:33:26 pm
content: Well duh. STM32F0 too ...As i said i was "lectured"

author: mrflibble
author_rank: Super Contributor
timestamp: July 29, 2012, 01:17:02 am
content: Quote from: hans on July 21, 2012, 10:50:25 pmAgreed, those NXP cortex M0's are pretty nice for the price. However for my current purposes the PWM capabilities on the lower end devices (< 2.00 EUR @ 100 units) is unfortunately only so-so.As far as I could tell the entry level models only supported edge aligned PWM, and no center aligned PWM. Combine that with the curious pinout layout (msp430 lower end mcu's have the same issue) and then all in all it's not super useful. Regarding pinout: I need 8 PWM outputs AND 8 adc inputs. So it'd be nice if the analog inputs are not mutually exclusive with LOTS of PWM outputs. As said, msp430 also suffers from this. But the STM8S cheapies actually do allow you to use all your analog inputs while still being able to use all the PWM outputs. Obviously the STM32F4 also fits the technical requirements, but it's a tad expensive. ;-)I will confess however I am not all that up to speed with the NXP parts, so maybe I missed the magical MCU that fits?

author: T4P
author_rank: Super Contributor
timestamp: July 29, 2012, 04:34:04 am
content: ALA, they should be the same.Since they are decidedly based on the same platform, but really you can make use of the extra speed on the NXP's chips.but there's a reason ST's not that quick, it's a M4F part, which means you can make use of the mighty FPU if need be.ST's 204MHz M4 without the FPU is still in the works*

author: mrflibble
author_rank: Super Contributor
timestamp: July 30, 2012, 02:35:36 am
content: Quote from: T4P on July 29, 2012, 04:34:04 amIf you intended this as reply to my post, then I'm afraid I don't quite follow. How can one make use of the extra speed of the NXP chips? To compensate for the PWM deficiencies mentioned? Hopefully not by bitbanging PWM or some such, because that kind of defeats the whole purpose of hardware support. Lack of center aligned PWM is annoying to workaround in software, not to mention the pinouts.And if you didn't intend it as a reply to my post, my bad, please ignore this. Carry on.

author: ju1ce
author_rank: Regular Contributor
timestamp: August 02, 2012, 11:35:43 am
content: I've played with this for a few nights and I'm starting to think that STM8 microcontrollers are quite nice. They are quite affordable, they havea lotof on-chip peripherals (like DAC, on-chip unique id, RTC etc.) and the register design seems quite logical. The biggest annoyance is the lack of decent (gcc) dev tools, which is a bit sad as it is a good chip.I think I may use STM8 chips in the future if I need a peripheral that isn't found on ATmegas or MSP430s (like a 12-bit DAC) and the application is not math intensive (that's for ARM chips).

author: bingo600
author_rank: Super Contributor
timestamp: August 02, 2012, 08:30:28 pm
content: @Ju1ceWhat compiler are you using for the STM8 ?I have 4 STM8S boards , just for using the Jtag part as a Versaloon Arm-Jtag SWD Dongle.Meaning , i have 4 STM8 boards (separated from the Jtag) , that just lies around.But .... TI is launching a $5 Cortex M4 "Launchpad" in late september.http://www.ti.com/ww/en/launchpad_site/stellaris.htmlIf periphs are nice on those , then i's suggest to di..h the STM8 (unless you'd need 1K+ for a proj)/Bingo

author: ju1ce
author_rank: Regular Contributor
timestamp: August 03, 2012, 06:03:05 am
content: Quote from: bingo600 on August 02, 2012, 08:30:28 pmI'm using IAR. It's not like I'm married to a microcontroller family, I just like to try new chips. I have previous experience with 8-bit AVRs and MSP430's, so I have a lot of choices for my projects.I got a TI Stellaris Cortex M3 dev board a few days ago to tinker with and registered my interest in the new launchpad. They (especially the level of documentation) seem nice and definitely have their place. With them I am also enable to develop using my Linux box, which is a huge plus.

author: T4P
author_rank: Super Contributor
timestamp: August 03, 2012, 11:42:18 am
content: Quote from: ju1ce on August 03, 2012, 06:03:05 amThat's the uC spirit! Try out every single uC ... it can come handy when you know most uC's

author: mrflibble
author_rank: Super Contributor
timestamp: August 04, 2012, 12:36:20 pm
content: Quote from: ju1ce on August 02, 2012, 11:35:43 amYup, pretty much agreed on all of that. I went over the msp430 + stm8 + nxp and to a lesser extent atmel and microchip as well, and for stuff that is not super cpu intensive but does need lots of peripherals at a low price, the STM8 looks pretty good IMO. What I like most about it is that you actually get to use all your analog inputs and all your pwm outputs and your SPI etc. On others (notably MSP430) there's too much conflicting pin usage. That is, the analog inputs block using other features such as PWM or SPI/UART/etc.The only reason I didn't rush to the store to get me 234234 of these is the so-so experience with STM32F4 toolchains. If the situation is the same for STM8S ==> meh. Ideally I'd like to do development for STM8S on linux, but if all else fails I'd even try IAR under windoze. Is there a free IAR edition with for example limited code size or something?Also, since you say you are using IAR for STM8 ... how's the experience. Easy and happy ^_^? Grumble grumble frigging fracking tools grumble? Anything in between?

author: T4P
author_rank: Super Contributor
timestamp: August 04, 2012, 04:54:37 pm
content: And plus according to ST the STM8 seems like the kings of 8bitters ... of speed

author: mrflibble
author_rank: Super Contributor
timestamp: August 04, 2012, 05:35:38 pm
content: Quote from: T4P on August 04, 2012, 04:54:37 pmNo doubt according to ST the STM8 is the king of <fill_in_marketing_blah_here/>.But in the 1.00 - 2.00 euro range they do indeed have nice ST8's with lots of peripherals for the price. Now if ST would make an effort to provide good toolchains they might actually be king in reality instead of in the minds of those in the marketing dept.

author: ju1ce
author_rank: Regular Contributor
timestamp: August 05, 2012, 11:07:28 am
content: Quote from: mrflibble on August 04, 2012, 12:36:20 pm"IAR Embedded Workbench for STM8 Kickstart edition" is free but has a 8K size limit. There was only one packet to install and it worked pretty much out of the box after I figured out that I need to run the IDE as administrator to get the debugger working. After that I tried the example codes and they compiled and worked without a hitch.All in all, IAR is not ideal but it works.

author: T4P
author_rank: Super Contributor
timestamp: August 05, 2012, 12:09:41 pm
content: most of the STM8 that i use don't go over 8k flash anywayAnyway