OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [MSP430X_MSP430F5438_IAR/] [low_level_init.c] - Blame information for rev 584

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 584 jeremybenn
/**************************************************
2
 *
3
 * This is a template for early application low-level initialization.
4
 *
5
 * Copyright 1996-2010 IAR Systems AB.
6
 *
7
 * $Revision: 2 $
8
 *
9
 **************************************************/
10
 
11
/*
12
 * The function __low_level_init it called by the start-up code before
13
 * "main" is called, and before data segment initialization is
14
 * performed.
15
 *
16
 * This is a template file, modify to perform any initialization that
17
 * should take place early.
18
 *
19
 * The return value of this function controls if data segment
20
 * initialization should take place. If 0 is returned, it is bypassed.
21
 *
22
 * For the MSP430 microcontroller family, please consider disabling
23
 * the watchdog timer here, as it could time-out during the data
24
 * segment initialization.
25
 */
26
 
27
/*
28
 * To disable the watchdog timer, include a suitable device header
29
 * file (or "msp430.h") and add the following line to the function
30
 * below:
31
 *
32
 *     WDTCTL = WDTPW+WDTHOLD;
33
 *
34
 */
35
 
36
 
37
#include <intrinsics.h>
38
#include "msp430.h"
39
 
40
int __low_level_init(void)
41
{
42
  /* Insert your low-level initializations here */
43
  _DINT();
44
  WDTCTL = WDTPW+WDTHOLD;
45
 
46
 
47
  /*
48
   * Return value:
49
   *
50
   *  1 - Perform data segment initialization.
51
   *  0 - Skip data segment initialization.
52
   */
53
 
54
  return 1;
55
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.