cancel
Showing results for 
Search instead for 
Did you mean: 

STM8L and STM8S resets

allantommathew
Associate II
Posted on June 06, 2018 at 13:04

Hi friends,

We are using STM8L(STM8L051F3) and STM8S (STM8S003F3) for a project. I has been designed, developed and deployed. It works as expected - STM8L as a transmitter, wakes up from stand-by mode, collect some data, transmits it and goes back to stand-by mode and STM8S as a receiver, receives it and represents it visually. This set up has been deployed and working for over a year now.

Now we redesigned the board with some extra functionality. We made the board and soldered the components but the new board continuously resets after 10-20 mins of operation. This is evident in both STM8L and STM8S. After a 'cool off time' of about 10-20 mins the board again works but back to the erratic behaviour after 10-20 mins.

On further evaluation we saw:

  1. inconsistencies with the NRST pin. The voltage of NRST pin is not constant at 3.3V but changes abruptly. This brought us to a similar problem faced by another person (

    https://community.st.com/0D50X00009XkfXRSAZ

    ) but the findings were inconclusive.

    It would vary between 1-2V when the debugger is not connected and between 2.2-2.6V when the debugger is connected.
  2. during the standby mode, the sleep current that the board takes is very high (it was around 0.8µA to 1.5µA in the previous design but it is around 35µA to 2mA, which is very high for a battery operated device).

Thus, we understand that the new design is not working properly.

We tried doing some more things for analysis:

  1. The new board was very similar to the old one. So we tried running the previous hex file (the deployed one) on the new board, but it showed the same problem (so there may not be an error in the code).
  2. The new micro-controller was soldered on the old board with the old code (the deployed hex file). But the old board started having the same issues as above (so we felt it has something to do with the micro-controller).

Please let me know if more information is needed, regarding schematic or waveforms or anything that can aid in decoding the problem. I would be obliged if anyone could guide me in the right direction.

Thank you.

With regards,

Allan.

#nrst-pin #stm8 #stm8s #stm8l #nrst #reset-pin
7 REPLIES 7
Artur IWANICKI
ST Employee
Posted on June 06, 2018 at 22:45

Hi

Tom_Mathew.Allan

‌,

Interesting case. Would it be possible for you to share at least part of the schematics, please? Most interesting would be power pins,. reset line. What I would start with is verification whether the max current is not exceeded on any of the pin, or you are not powering the device somehow on IO lines. Could you please describe briefly what kind of extra functionality have you added?

Thank you in advance,

Best Regards,

Artur

Artur IWANICKI
ST Employee
Posted on June 07, 2018 at 10:05

Hi

Tom_Mathew.Allan

‌,

I would strongly recommend to keep solution no 3 concerning NRST line (only 100nF capacitor to GND).

I can see 2 potential trouble makers in your design:

PB0 - this pin is kept in pull-up configuration during reset and then after the reset it is in input floating by default, thus it may demonstrate higher current consumption during reset phase due to external pull-down.

PC0 - this pin is True OD what means that it has not implemented neither P-buffer nor protection diode to Vdd, thus in case of output configuration it required an external pull-up.

Please have a look at pin description section of the datasheet for more details.

Best Regards,

Artur

Posted on June 07, 2018 at 09:09

Hi

iwanicki.artur

‌,

Thank you for your reply.This isthe schematic for the transmitter which employees a STM8L micro controller for its operation.

The is the full schematic design.

In the design of the transmitter, there is no functional change. The board size has been changed to fit into a new enclosure,whereby the layout has been changed.

Project 1

This is the old schematic (the working and deployed version):

0690X0000060Ba9QAE.png

This is the new schematic (version which has the issue):

0690X0000060Ba4QAE.png

According to the datasheet we need not put a pull up resistor for the NRST pin. Thoughthe former

design

worked flawlessly with the pull up on NRST, the latter didn't.

0690X0000060BaEQAU.png

To rule out this mistake, we tweaked the design:

  1. removed the pull up resistor on NRST (kept it open) and checked the working of the board. Still the board shows the same behaviour.
  2. removed the pull up resistor on NRST (kept it closed) and checked the working of the board. Stillfailed.
  3. removed the pull up resistor and connected a 0.1µF capacitor to match the design on the datasheet. Still failed. In this case the board didn't reset abruptly but the current consumption was very high (0.5mA to 3mA).

These were the observation that we had.

Posted on June 07, 2018 at 14:17

Hi

iwanicki.artur

‌,

We have two board now, to test things.

The behaviour of the first was stated before.

The second behaves randomly, taking a lot of current (10mA to 70mA) and doesn't work as per the program(the LED lighting up is an indication but the LED never lights up on this board. When we put the debugger pins on the LED lights up).

I would strongly recommend to keep solution no 3 concerning NRST line (only 100nF capacitor to GND).

Yes. We will keep it that way for the testing purpose. But the previous design works flawlessly, even now.

PB0 - this pin is kept in pull-up configuration during reset

Yes. Came across the specification in the data sheet. We removed the pull-down resistor from the board to test the case but the issues still remains in both the boards..

PC0

We are not using this pin as of now. We didn't use it in the previous designs too. We understand that the pin cannot be made push-pull.

The above solutions did not solve the problem but thank you so much for the suggestions.If you still have something that we could try doing we are definitely up for it.

Thank you.

Allan.

allantommathew
Associate II
Posted on June 20, 2018 at 06:59

Hi

iwanicki.artur

‌,

We tried making three to four boards from different vendors from different parts of the world, to rule out the manufacturing defects. This didn't pay off, the board still has the same issue. We are looking into the layout too. We recently switched to KiCad from Eagle. The previous desing was on Eagle while the second design is on KiCad. Hope that isn't the cause of the issues.

Thank You.

Allan.

Prasenjeet Saurav
Associate
Posted on July 04, 2018 at 07:27

I have the same issue. Did you come up with a solution? My project is lagging behind because of this.

Posted on July 04, 2018 at 14:29

My take away from the thread the OP cited is that the STM8 will generate a reset when an invalid instruction is encountered.

It is not clear if you have the &39same issue&39, or how similar it is, a plot of NRST vs time might be more illustrative. The periodicity or randomness of this being the most enlightening.

https://community.st.com/0D50X00009XkW94SAF

 

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