MC9S0AC16 I/O direction lost at wake up from Stop3 until registers are re-initialised.

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

MC9S0AC16 I/O direction lost at wake up from Stop3 until registers are re-initialised.

348 Views
Remiforcet22
Contributor I

  Hi,

 

I am using the MC9S08AC16 micro

The program I am working on makes the uP go to sleep (Stop3) about 20 seconds after power up, then it gets awaken by IRQ.

All outputs I am using then seem to change into inputs until all the registers are configured properly.

This is a problem because this means outputs are floating for about 2ms.

 

I have been using the CodeWarrior debugger, and I could see that pin E1 would be an input right after wake up/power up and set properly as an output only after this code:

 

 for( x = 0; x <= 13; x++ )    /* load registers 0 to 13 */
  {
     *((near byte *) x) = register_setup[x];
  }

 

I would like the uP to keep the same data direction after wake up as before (Note that the I/O direction is kept OK during sleep)

Can you help?

Labels (1)
0 Kudos
Reply
1 Reply

246 Views
bigmac
Specialist III

Hello, and welcome to the forum.

 

What you have described would seem to suggest that you are using Stop2, rather than Stop3 mode.

 

During Stop2 mode, the current I/O output state is latched, but the registers must be re-initialised after wakeup.  This should not be required after wakeup from Stop3.

 

Refer to sections 3.6.1 and 3.6.2 of the device datasheet.

 

Regards,

Mac

 

0 Kudos
Reply