Exemplo n.º 1
0
/**
Configures hardware for the particular hardware platform:
- Ports: sets direction, interrupts, pullup/pulldown resistors etc.
- Holds radio in reset (active-low)
*/
void halInit()
{
    //
    // Enable the floating-point unit.
    //
    FPUEnable();
    //
    // Configure the floating-point unit to perform lazy stacking of the
    // floating-point state.
    //
    FPULazyStackingEnable();

	oscInit();
	portInit();
	halUartInit();

    //Point the function pointers to doNothing() so that they don't trigger a restart
    debugConsoleIsr = &doNothing;
    buttonIsr = &doNothing;
    clearLeds();
    displayVersion();
#ifdef AF_VERBOSE
        printf("* AF_VERBOSE *\r\n");
#endif
}
Exemplo n.º 2
0
/**
 *
@note It takes five clock cycles after SysCtlPeripheralEnable() is called to enable a peripheral before the the peripheral is
actually enabled. During this time, attempts to access the peripheral will result in a bus fault.
Care should be taken to ensure that the peripheral is not accessed during this brief time period.
 */
void halInit()
{
    oscInit();
    portInit();
    SysCtlPeripheralEnable(SYSCTL_PERIPH_ETH);
    SysCtlPeripheralReset(SYSCTL_PERIPH_ETH);

    //Point the function pointers to doNothing() so that they don't trigger a restart
    //debugConsoleIsr = &doNothing;
    buttonIsr = &doNothing;
}
Exemplo n.º 3
0
/** 
* Configures hardware for the particular board
* - Initializes clocks
* - Ports: including purpose, direction, pullup/pulldown resistors etc. 
* - Holds radio in reset (active-low)
*/
void halInit()
{    
  oscInit();
  portInit();  
  DEBUG_CONSOLE_INIT(BAUD_RATE_19200);
  AUX_SERIAL_PORT_INIT(BAUD_RATE_115200);  //Module uses 115,200 8N1 WITH FLOW CONTROL
  
  //
  //   Deselect SPI peripherals:
  //
  SPI_SS_CLEAR();                       // Deselect Module
  
  //  Stop Timer A:
  TACTL = MC_0;     
  
  debugConsoleIsr = &doNothing;
  buttonIsr = &doNothing;
  
  halSpiInitModule();
}