Author Topic: Over. 2 billion stm8 sold  (Read 8607 times)

0 Members and 1 Guest are viewing this topic.

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Over. 2 billion stm8 sold
« Reply #25 on: June 17, 2016, 01:02:01 pm »
Quote
latest build is STVD 4.3.9 from april 2016

Mine is 4.3.5, from 2013.

Doesn't sound like they are putting a lot of resources into it. Back to iar, :)
================================
https://dannyelectronics.wordpress.com/
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Over. 2 billion stm8 sold
« Reply #26 on: June 17, 2016, 01:23:16 pm »
Ofcourse not the STM8 is a cashcow, they are milking it not investing too much in it anymore.
I really wonder if there will (ever) be a next generation 8 bit microcontroller (stm9) even from other vendors or that this was it and they are now pushing customers to the cheapo 32 bitters like the F0 series.
Would be a shame (IMO) since a small 8 bitter is an ideal way to start learning embedded programming.
 

Offline bazsa56

  • Contributor
  • Posts: 24
  • Country: hu
Re: Over. 2 billion stm8 sold
« Reply #27 on: June 17, 2016, 01:35:48 pm »
Yeah, IAR would be much better, but right now we're not in a position to buy one just for this 1 product where we're using it in. STVD is not that bad, certainly not great but usable.

Regardless of the IDE and compiler, I'm very impressed with the chip itself. Don't mind the quirky architecture at all. I started using it mainly because of the price, but ended up really liking the chip and I see no drawbacks (minus the architecture, which the compiler handles anyway) to it, while I do see some advantages compared to other 8 bit micros. We expect our product to reach somewhat higher volumes then our other products, but the software inside is relatively simple. Our requirements aren't too specific, any chip that has an active current that isn't crazily high and has a hardare multiplier, plus UART and either I2C or SPI is fine. For this specific application I think the STM8 is a no brainer.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Over. 2 billion stm8 sold
« Reply #28 on: June 17, 2016, 01:39:57 pm »
Just looked for the oldest S207 datasheet I could find in my archive, it is from august 2008, rev4 and it is preliminary.
I guess the STM8S1xx series were already on the market by then  :)


either I2C or SPI is fine. For this specific application I think the STM8 is a no brainer.
Watch out for that STM8 I2C peripheral it can bite in some applications and it takes time to work around it and lot's of frustration  :(
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Over. 2 billion stm8 sold
« Reply #29 on: June 17, 2016, 01:42:11 pm »
Quote
I really wonder if there will (ever) be a next generation 8 bit microcontroller (stm9)

probably not, unless ST wants to compete in the low-end with Chinese / Taiwanese clones.

The CM0 is really the next "8/16" bit chip.

Quote
I think the STM8 is a no brainer.

I agree. Liked the TSSOP20 versions of both STM8 / STM32F0. The STM8 is a little bit pin limited. They really should just get rid of the onboard LDO and consolidated the STM8S and STM8L lines: the minimum voltage for STM8S is too high due to the LDO. To me, the 8L is simply a 8S - the LDO.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Over. 2 billion stm8 sold
« Reply #30 on: June 17, 2016, 02:08:30 pm »
Quote
Watch out for that STM8 I2C peripheral it can bite in some applications and it takes time to work around it and lot's of frustration  :(

It is a software problem. Basically those incompetent ST coders failed to clear EV6 in the SPL, as their datasheets clearly demanded. Once you fix that, it is golden.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Over. 2 billion stm8 sold
« Reply #31 on: June 17, 2016, 02:10:19 pm »
The "solutions" ST proposed in the cpal drivers basically render the devices unusable: they all evolve around making the i2c the highest priority process -> a low-speed peripheral taking the highest priority process. That's how crazy those guys are.

Once you code to the datasheet, you should be fine.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Over. 2 billion stm8 sold
« Reply #32 on: June 17, 2016, 02:24:00 pm »
the most amazing thing about the i2c fiasco is that st's own i2c examples would not run on their own hardware. You would think the application teams and the qa teams would have caught that before their distribution.
================================
https://dannyelectronics.wordpress.com/
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Over. 2 billion stm8 sold
« Reply #33 on: June 17, 2016, 02:26:10 pm »
It is a software problem. Basically those incompetent ST coders failed to clear EV6 in the SPL, as their datasheets clearly demanded. Once you fix that, it is golden.
I never used the SPL for the STM8  ;)
But I have to dig into it, I had some problems with hanging clocks in combination with some microchip i/o expander, i wrote both off and used a serial shift register with ultrahigh speed  :)
If you could post some code and the fix  :-/O , would appreciate it, might be usefull for some future project where I can not get past using the I2C unless I bitbang it.

the most amazing thing about the i2c fiasco is that st's own i2c examples would not run on their own hardware. You would think the application teams and the qa teams would have caught that before their distribution.
or at least fixed it when the complaints started pooring in the support forum  :(
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Over. 2 billion stm8 sold
« Reply #34 on: June 17, 2016, 03:06:14 pm »
"
If you could post some code and the fix  :-/O , would appreciate it, might be usefull for some future project where I can not get past using the I2C unless I bitbang it."

Cannot give you the code - it was discovered when I was under a contract so it technically is other people's code but I can give you thee general flow when I get to a real computer later.

BTW, I'm only the 2nd person in the world who found the fix. The first person is the datasheet writer. The fix is laid wide open in the data sheet as it provides explicit fix in thee documents. How the SPL code monkeys missed that is beyond me.
================================
https://dannyelectronics.wordpress.com/
 
The following users thanked this post: Kjelt

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Over. 2 billion stm8 sold
« Reply #35 on: June 17, 2016, 04:47:23 pm »
"
If you could post some code and the fix  :-/O , would appreciate it, might be usefull for some future project where I can not get past using the I2C unless I bitbang it."

Cannot give you the code - it was discovered when I was under a contract so it technically is other people's code but I can give you thee general flow when I get to a real computer later.

BTW, I'm only the 2nd person in the world who found the fix. The first person is the datasheet writer. The fix is laid wide open in the data sheet as it provides explicit fix in thee documents. How the SPL code monkeys missed that is beyond me.

Thanks, that would be great, also a direct quote from the datasheet where the issue exactly is located would be ok, then there are also no contractual issues  :).
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Over. 2 billion stm8 sold
« Reply #36 on: June 17, 2016, 04:49:53 pm »
No problem. I will show you a picture of the datasheet. Just a little bit later.
================================
https://dannyelectronics.wordpress.com/
 

Offline eck

  • Contributor
  • Posts: 15
Re: Over. 2 billion stm8 sold
« Reply #37 on: June 17, 2016, 05:55:52 pm »
Thanks, that would be great, also a direct quote from the datasheet where the issue exactly is located would be ok, then there are also no contractual issues  :).

As the STM32F1 and STM8 I2C peripherals are basically the same, you can check in either reference manual ;) The key is the diagram called "Transfer sequence diagram for master transmitter". It explains what to do when - specifically, one gotcha is to clear the ADDR flag in SR1. To clear that flag, you need to read SR2 (STM32) or SR3 (STM8). The STM32F1 reference manual mentions this actually three times for good measure (first in the description of the diagram and then twice in the description of the SR2 register).

The other quirky thing with the I2C peripheral is the need to generate the STOP condition three bytes prior to the last byte in multibyte read transfers.

However, all of this is pretty clearly explained in the reference manuals, including pictures.
 
The following users thanked this post: Kjelt

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Over. 2 billion stm8 sold
« Reply #38 on: June 17, 2016, 07:19:11 pm »
eck got that right.

this is from the f1 datasheet, with the ev6 condition highlighted. Essentially, the code in F1 SPL does not follow that.

my code, for a i2c block writes, goes like this:

1. test for bus condition. if busy, return -1;
2. send a start condition;
3. load up device address + i2c command;
4. clear SR1/SR2 through two dummy reads. you don't even need to read them into anything.
5. load up the register address, ........

you will need to test conditions along the way and be prepared to handle exceptions. similar operations with read.

identical process with STM8, different register names.
================================
https://dannyelectronics.wordpress.com/
 
The following users thanked this post: Kjelt

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Over. 2 billion stm8 sold
« Reply #39 on: June 17, 2016, 07:20:53 pm »
Short of the cpal solutions, any i2c code on those chips that do not follow the protocol above is unlikely to work. and there are quite a few such pieces floating around claimed by their creators to be "working", :)

I wonder if they actually tested their code, :)
================================
https://dannyelectronics.wordpress.com/
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Over. 2 billion stm8 sold
« Reply #40 on: June 17, 2016, 07:38:34 pm »
Ah thanks, I will have to look into that if my code has it.
Still what a mess with all those states don't you think, you would expect it could have been made so much simpler, but then as we talked about in the other thread, probably not  :)
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Over. 2 billion stm8 sold
« Reply #41 on: June 17, 2016, 07:41:05 pm »
The best i2c routines I have seen are those done by NXP  - fully state machine driven and incredibly easy to add / change exception handling regimes.

yes, I think the i2c implementation, both hardware and software, here and on ST chips in general is a mess.
================================
https://dannyelectronics.wordpress.com/
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Over. 2 billion stm8 sold
« Reply #42 on: June 17, 2016, 07:45:45 pm »
Weird huh, the other peripherals like the timers, dac and uart are fine, no problems what so ever.
 

Offline richardman

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
Re: Over. 2 billion stm8 sold
« Reply #43 on: June 17, 2016, 07:56:38 pm »
Yes, when I coded the I2C routines, I coded using the datasheet rather than the SPL/HAL examples and tested the heck out of them. There are definitely typos etc. in those SPL code!!

// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Over. 2 billion stm8 sold
« Reply #44 on: June 17, 2016, 10:31:48 pm »
Quote
IAR supports it. If you program micros for a living, you have IAR, right?
there's a weak implication here that adding an additional target cpu to IAR is cheaper than buying a whole new compiler.
Is that actually the case?

The STM8F030 is priced like a low-end 8bit microcontroller.  In that area, you don't ALWAYS need a C compiler...
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Over. 2 billion stm8 sold
« Reply #45 on: June 17, 2016, 11:04:49 pm »
Quote
IAR supports it. If you program micros for a living, you have IAR, right?
there's a weak implication here that adding an additional target cpu to IAR is cheaper than buying a whole new compiler.
Is that actually the case?

The STM8F030 is priced like a low-end 8bit microcontroller.  In that area, you don't ALWAYS need a C compiler...
I recall a project where only one engineer could change the software because my employer at that time was too cheap to buy a compiler so the project was coded in assembly. Using the STM8 ended up costing 10 times more than the savings in part costs and the product was already a kludge with an 8051 controller for the main tasks and the STM8 doing something I/O related  :palm:

There really has to be a compelling reason to use these archaic non-mainstream (=no GCC support) microcontrollers and that is volume volume volume. If that doesn't apply to your projects then by all means don't use these kinds of controllers because they will end up costing way more than the savings in part costs.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Over. 2 billion stm8 sold
« Reply #46 on: June 18, 2016, 12:01:47 am »
Quote
when I coded the I2C routines, I coded using the datasheet

Yeah. As long as you code to the datasheet, it is ok.

Quote
There are definitely typos etc. in those SPL code!!

Yeah. Take a look at STM8S SPL's handling of HSE_Value. Total retards.
================================
https://dannyelectronics.wordpress.com/
 

Offline bazsa56

  • Contributor
  • Posts: 24
  • Country: hu
Re: Over. 2 billion stm8 sold
« Reply #47 on: June 21, 2016, 11:30:42 am »
I can confirm as well that using the datasheet the I2C works just fine. Just finsihed writing my own routines for it, works quite well actually once you get it worked out. Not using the SPL at all for my project, the STM8 is simple enough to just poke the registers directly.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf