Using reset pin as I/O

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using reset pin as I/O

715 Views
rdazcal
Contributor III

Greetings,

 

I am working with the MC9S08LC60,

 

I wish to use the Reset pin as a regular I/O pin, so I set the "System Options Register (SOPT1)" bit "Reset Pin Enable (RSTPE)" to 0. I also set the pull-up bit for this port.

 

So far so good.

 

The problem is: if I reset the equipment, if this pin is set to ground, the MCU won't initiate (seems that after reset, this pin functions as reset again).

 

This is, for me, an odd behavior, because no one who would want to use the reset pin as I/O can predict it's state during reset.

 

Reading the LC60 data-sheet, I have the following description:

Reset Pin Enable — This write-once bit when set enables the PTB2/RESET/ pin to function asRESET. When clear, the pin functions as one of its input only alternative functions. This pin defaults to its input-only port function following an MCU POR. Once configured for RESET pin, only POR can disable the RESET pin function. When RSTPE is set, an internal pullup device is enabled on RESET.

 

This leads me to believe that this bit value during reset should be set for I/O, which would make sense.

 

But in the data-sheet, it also sais it's reset value is 1 (reset function), which sounds like a contradiction. But debugging the MCU I confirmed this last information.

 

Is there a contradiction in the data-sheet, or am I not getting the point?

Labels (1)
0 Kudos
1 Reply

290 Views
kef
Specialist I

Yes, if default /RESET pin function is /RESET, then you almost can't use this pin for digital input function. To use /RESET as input, external driving device should know when your MCU resets and should stop driving pin immediately until some confirmation that you configured /RESET for I/O...

You can use /RESET for ouput, but load on /RESET pin should not pull /RESET pin low.

0 Kudos