This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2148 Reset source Identification

hi,
I need to find out whether the LPC2148 is reset due to POR(power-on reset) or by the RESET pin becoming low. As per the user manual UM10139, I read about the RESET SOURCE IDENTIFICATION REGISTER (RSIR). They have mentioned the 4 possible sources of reset action i.e.: POR,RESET pin, Watchdog and Brownout detection.
My application needs to check for the first two conditions only. But the problem is, every time when my code checks for the RSIR register at the very beginning of the execution, both the bits (Power-On reset and RESET pin) of the RSIR register are SET to 1 no matter in what way I reset the microcontroller. Either of the 2 bits should be set based upon the type of reset i provide.
Please help in finding the solution to this problem.

Regards,
Karan

Parents
  • Yes, we have already concluded that your code doesn't work.

    The interesting thing is why you just posted your code without taking into account my question.

    The user manual for the chip says:
    "Writing a 1 to any of these bits clears the corresponding read-side bit to 0."

    Don't you find that piece interesting? Interesting enough to actually consider testing it?

    Next thing: have you made sure you understand the meaning of the descriptions for the different bits? Are you sure that the manual promises that you will only see one single bit at a time?

Reply
  • Yes, we have already concluded that your code doesn't work.

    The interesting thing is why you just posted your code without taking into account my question.

    The user manual for the chip says:
    "Writing a 1 to any of these bits clears the corresponding read-side bit to 0."

    Don't you find that piece interesting? Interesting enough to actually consider testing it?

    Next thing: have you made sure you understand the meaning of the descriptions for the different bits? Are you sure that the manual promises that you will only see one single bit at a time?

Children