This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5659: Power on execution sequence

Part Number: MSP430F5659

Hi,

Please let me know about MSP430F5659;

i) What is the power-on procedure (execution sequence) from 3.3V availability to the beginning of the main()?

ii) How long does it actually take for executing the main() after the 3.3V stable?

iii) Any ideas for shortening the power-up delay?

Note: In my application, I need to make a crucial decision within 10ms of power-up (3.3V), yet I'm experiencing a startup delay of 46ms (Test code attached)

For reference, attached Test results taken from my application:

1) Power on delay from 3.3V stabilization point [GREEN] to start of main [PINK] 

Measured time = 46ms

2) Main code used for time delay measurement 

int main(void)
{

  WDTCTL = WDTPW + WDTHOLD;    // Stop watchdog

  _DINT();   // Disable interrupt

  // Debug IO (P7.4) configuration

  P7SEL  &= (~BIT4);

  P7DIR  |=  BIT4;

  P7OUT |=   BIT4;   // Pink signal in the scope image

..

..

  while(1)

  {

      ...

   }

}

  • C startup code has to run of course. This has to copy data to global initialized variables and zero out the bss. The time required depends on the size of those areas. Your particular device also has boot code to run. Table 8.27 in the data sheet specifies a maximum of 3ms from power up reset to reset vector execution.

    For ultimate control, use assembly rather than C.

    There might be a hook available to execute code early. This is used in those rare cases where the C startup runs longer than the initial timeout of the watchdog. Details dependent on the particular compiler used.

    Oh, it appears that this part is one of the ones with LOCKLPM5 which makes me wonder about your test code.

  • Hello,

    What David suggested is correct. You will need to set the LOCKLPM5 bit for GPIO to be properly set after a reset (or first power up). That being said, our specification for reset is until the reset vector is reached. This should be after boot code execution, but other c initialization can happen before you reach main. You can skip c init procedures or add code before c init to make a fast decision to help speed this up. Use the _system_pre_init() 

**Attention** This is a public forum