GPIO port F configurations and initializations

This commit is contained in:
Rajput R Vikramsingh Vikramsingh 2024-09-19 22:50:45 +05:30
parent 0d7b2a1af7
commit f7e899dcff
1 changed files with 27 additions and 8 deletions

View File

@ -30,11 +30,30 @@ void main(void)
while(1); while(1);
} }
GPIO_PORTF_AFSEL_R |= 0x02;
GPIO_PORTF_PCTL_R |= 0x50; void GPIOF_Config()
PWM1_2_CTL_R= 0x00000000; {
PWM1_2_GENB_R |= 0x80E; SYSCTL_RCGC2_R |= 0x20;
PWM1_2_LOAD_R = 0xA0; GPIO_PORTF_LOCK_R = 0x4C4F434B;
PWM1_2_CMPB_R = 0x50; GPIO_PORTF_CR_R = 0x1F;
PWM1_2_CTL_R |=0x01; GPIO_PORTF_DEN_R= 0x1F;
PWM1_ENABLE_R |=(1<<5); GPIO_PORTF_DIR_R= 0x0E;
GPIO_PORTF_PUR_R = 0x11;
}