Exemple #1
0
INLINE void hw_initIntTemp(void)
{
    SYSCTL_RCGC0_R |= SYSCTL_RCGC0_ADC0;

	lm3s_busyWait(10);

    /* Disable all sequence */
    HWREG(ADC0_BASE + ADC_O_ACTSS) = 0;
    /* Set trigger event to programmed (for all sequence) */
    HWREG(ADC0_BASE + ADC_O_EMUX) = 0;
    /* Enalbe read of temperature sensor */
    HWREG(ADC0_BASE + ADC_O_SSCTL3) |= ADC_SSCTL3_TS0;
    /* Enable sequence S03 (single sample on select channel) */
    HWREG(ADC0_BASE + ADC_O_ACTSS) |= ADC_ACTSS_ASEN3;
}
Exemple #2
0
INLINE void kdbg_hw_init(void)
{
	uint32_t reg_clock = 1 << CONFIG_KDEBUG_PORT;

	/* Enable the peripheral clock */
	SYSCTL_RCGC1_R |= reg_clock;
	SYSCTL_RCGC2_R |= UART_REG_SYSCTL;
	lm3s_busyWait(512);

	/* Configure GPIO pins to work as UART pins */
	lm3s_gpioPinConfig(UART_GPIO_BASE, UART_PINS,
			GPIO_DIR_MODE_HW, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD);

	/* Low-level UART configuration */
	uart_hw_config();
}