cancel
Showing results for 
Search instead for 
Did you mean: 

How to distinguish stm8s005 from stm8s105 from inside the controller?

komp
Associate II
 
5 REPLIES 5
Cristian Gyorgy
Senior III

You could try to read the unique ID bytes ($48CD:$48D8. They are only present on STM8S105, so here you will read real values, different form 0x00, while trying to read the option bytes on STM8S005, where they are not available, you should only get zeroes, 0x00.

komp
Associate II

No, it's not. In stm8s005c6 at the specified addresses are not zeros.

No, it's not. In stm8s005c6 at the specified addresses are not zeros.

Cristian Gyorgy
Senior III

It was my only idea. Usually, when trying to read a reserved/unavailable memory space in 90% of cases I get 0x00.

You could try to read addresses $5206 and $5207 (registers SPI_RXCRCR, SPI_TXCRCR), as the datasheet states that these registers are 0xFF after reset on STM8S105 and 0x00 on STM8S005 - but I would say it's rather an error in the datasheet.

You're going to have to probe the registers, looking for differences, and stuck at zero/one settings of given parts.

If you want support from ST staff, I would suggest calling your local sales office, and support engineer (FAE) assigned to your account.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..