2024-09-19 23:15:59 +05:30
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "tm4c123gh6pm.h"
|
|
|
|
|
|
|
|
#define STCTRL *((volatile long *) 0xE000E010)
|
|
|
|
#define STRELOAD *((volatile long *) 0xE000E014)
|
|
|
|
#define STCURRENT *((volatile long *) 0xE000E018)
|
|
|
|
|
|
|
|
#define COUNT_FLAG (1 << 16)
|
|
|
|
|
|
|
|
#define ENABLE (1 << 0)
|
|
|
|
|
|
|
|
#define CLKINT (1 << 2)
|
|
|
|
#define MASK_BITS 0x1
|
|
|
|
|
|
|
|
void GPIOF_config(void);
|
|
|
|
void GPIOF_int_config(void);
|
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
SYSCTL_RCC_R &= ~(1 << 20);
|
|
|
|
SYSCTL_RCGC0_R |= 0x00100000;
|
|
|
|
SYSCTL_RCGCPWM_R = 0x3;
|
2024-09-19 23:18:07 +05:30
|
|
|
//SYSCTL_RCGC2_R |= 0x20;
|
|
|
|
//GPIO_PORTF_DEN_R= 0x1F;
|
|
|
|
//GPIO_PORTF_DIR_R= 0x0E;
|
2024-09-19 23:15:59 +05:30
|
|
|
}
|