Connect with us

How to check external watched dog IC when toggling MCU oscillator?

Discussion in 'Microcontrollers, Programming and IoT' started by Hasan2019, Jul 29, 2021.

Scroll to continue with content
  1. Hasan2019

    Hasan2019

    19
    2
    Sep 11, 2019
    Hi There,


    I am working with a MCU STM32F405VET for any particular purpose. Lets say at this time firmware code has burn on MCU. Lets talk about HW issue.

    Take a look the datasheet here https://www.qdatasheet.com/datasheet-download/190671/1/ST-Microelectronics/STM32F405VET6


    In my design portion a 25MHz oscillator supports MCU for clocking. See the attached file.
    watched_problem.png
    In this time a watched dog ic STWD100NXWY3F working externally,https://www.st.com/resource/en/datasheet/stwd100.pdf


    What it does is watchdog timer is as a system monitor to detect and reset an "out of control" microprocessor. When program execution goes awry it will not properly execute the code that restarts the watchdog. In such a case the watchdog timer will timeout and cause a microcontroller reset. In a properly designed system, the reset will correct the error. Is the case of independent watched dog from main MCU timer.

    I want to connect a toggle switch in 2 and 3 point of crystal oscillator XT1 and wish to see the input out put of 1 and 4 of U29 watched dog.

    No if you look on the circuit diagram, at U29 IC pull up and pull down resistor are visible.
    Now according to datasheet of STWD100NXWY3F , EN-PIN should have pull down resistor should be 62-100k.
    What I did is I have change R101 to 51k, then my board does not work.

    If I remove it along with R106 then WDO is unstable but after a time MCU is going to RESET!


    I did see in oscillator when I push the switch meaning that 3 and 2 pin of XT1 has been shorted then input of U29 distorted but wont disappeared.

    It wont clear instantly , what do you think?


    Datasheet of STWD100NXWY3F says, While the system is operating correctly, it periodically toggles the watchdog input, WDI. If the system fails, the watchdog timer is not reset, a system alert is generated and the watchdog output, WDO , is asserted. BUT MY MCU NEVER GOES TO RESET.

    Now there is 2 way to reset this MCU.
    Inactivated Q15 and Q19 coupled transistor those are use in F/W WD reset. or only drive Q16 and 18. A forward diode can activate them, for toggling crystal switch MCU can go RESET, but its questionable since application display is not clear
     
  2. DBingaman

    DBingaman

    108
    28
    Jun 27, 2021
    Q16 and Q18: It does not have a current limiting resistor. The emitter base current of Q18 is not limited. I am surprised Q18 is not being destroyed. Also need current limiting resistors on Q15 and Q16. I am a little concerned about those.
     
    Hasan2019 and Harald Kapp like this.
  3. Hasan2019

    Hasan2019

    19
    2
    Sep 11, 2019
    Well noticed.
    Could you kindly draw in paper and post it here where the current limiting resistor is applicable? Did you see the RESET net is also connected with pull up resistor R66 and lower with C66? KRA10S and KRC105S both has built in bias resistor.
     
  4. DBingaman

    DBingaman

    108
    28
    Jun 27, 2021
    Sure, working on it now...
     
  5. DBingaman

    DBingaman

    108
    28
    Jun 27, 2021
    Ok, changes in red with circles:

    MODS1.PNG
    Notes:
    Until I see the datasheets for the 'transistors' this may be completely wrong, depending how the 'bias' resistors that are built into the part are seen on the datasheets.

    1. Oops, 10K on RESET line not required. I see you already have it: R66
    2. I added the two capacitors to try to assure the circuit is not latched on power up, you may want to adjust the values if you have issues.
    3. 10K's arbitrarily chosen as reasonable current limits. Could be other values.
     
    Last edited: Aug 5, 2021
    Hasan2019 likes this.
  6. DBingaman

    DBingaman

    108
    28
    Jun 27, 2021
    Do you have a datasheet on the KRA1055 and KRC1055? I am having trouble finding those parts on line.
     
  7. DBingaman

    DBingaman

    108
    28
    Jun 27, 2021
    If they have built in bias resistors that can change everything! I am having trouble locating the datasheets for those parts. Can you please supply them?
     
    Hasan2019 likes this.
  8. Hasan2019

    Hasan2019

    19
    2
    Sep 11, 2019
    Take a look on those.
     

    Attached Files:

  9. DBingaman

    DBingaman

    108
    28
    Jun 27, 2021
    Ok, throw out everything I said about current limiting resistors. They are built into these packages.
    I would highly recommend redrawing the schematic to include the current limiting resistors with R1=2.2K and R2=47K.
    Not sure what tool you are using for schematic, but it possible I would make custom component that shows the BJT with the proper internal resistor values. Currently the schematic is misleading. If another engineer looks at the schematic they are going to come to the same conclusions I did. We need to show on the schematic either a black box device with three terminals or show the internals of the device as it is not simply a BJT. After the schematic is redrawn showing the actual circuitry, I will take another look at it with that in mind.
     
    Last edited: Aug 5, 2021
  10. DBingaman

    DBingaman

    108
    28
    Jun 27, 2021

    Attached Files:

    Hasan2019 likes this.
  11. Hasan2019

    Hasan2019

    19
    2
    Sep 11, 2019
    Built in biasing BJT's are used not for wrong selection but to save number of components in pcb.
    I do appreciate your suggestion. The output of the external watchdog timer is open drain and active low according to page five of the datasheet. According to the datasheet on page 1, there is an internal pull down resistor connected to the active low enable pin, but R106 and R107 may interfere with the internal pull down resistor by causing the voltage to be at an undefined level.
    I just remove them.

    What I did is connect a IN4148 at the base of Q15 that goes to pin 1 of U29 WD IC.
    Then I started push and pull the switch again in XT1 and saw the WDO input pulse diminishes and MCU got reset.
    After "time out" system restart again!
     
    DBingaman likes this.
  12. DBingaman

    DBingaman

    108
    28
    Jun 27, 2021
    I
    I have nothing against built in biasing BJT's. The issue is the schematic needs to show a different symbol for them as they are not just BJT's. On a previous board, I have seen built in BJT's on the schematic that had a single component with a 'box' around it. That showed the BJT along with the 2.2K and 47K biasing resistors going to terminals at the component 'box' level. IMHO, this is more correct to place on the schematic. If you place a normal BJT when it has current limiting resistors not shown, it makes the schematic difficult to for another engineer to pick up and understand. It is what caused me to think there was something seriously wrong with the schematic you presented. I would highly recommend having the schematic show a proper symbol for built in biasing BJT's.

    Here is a sample of a 'package BJT with built in bias. The bias resistor values are not shown BUT it tells the engineer this is NOT just a BJT and if they need to know the bias resistor values they can then look at the datasheet for the part:

    BiasedBJTSymbol.PNG
     
    Last edited: Aug 6, 2021
  13. DBingaman

    DBingaman

    108
    28
    Jun 27, 2021
    Glad to here it is working now :)
     
  14. Hasan2019

    Hasan2019

    19
    2
    Sep 11, 2019
    Still the pcb is working and can make money. Schematic tool can make you confused since you dont know the whole picture of it.
    Other nets are available in another page.
     
    DBingaman likes this.
  15. DBingaman

    DBingaman

    108
    28
    Jun 27, 2021
    My previous employer would have issues with a schematic like that. But as long as you and your company is ok with it that is fine. Glad to hear it is working for you.
     
  16. Hasan2019

    Hasan2019

    19
    2
    Sep 11, 2019
    Dear Sir DB,

    Your efforts in this topic is excellent.
    You are helping a lot. Actually there is nothing we can test in circuit for WatchDog.

    This application is just reloading the page of .h or .c files over time because to protect the software.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-