From f7e899dcffa9b149b8a34118243157de06b75a31 Mon Sep 17 00:00:00 2001 From: Vikram Rajput Date: Thu, 19 Sep 2024 22:50:45 +0530 Subject: [PATCH] GPIO port F configurations and initializations --- Lab6_Task1.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/Lab6_Task1.c b/Lab6_Task1.c index a9ece2c..198ccf9 100644 --- a/Lab6_Task1.c +++ b/Lab6_Task1.c @@ -30,11 +30,30 @@ void main(void) while(1); } -GPIO_PORTF_AFSEL_R |= 0x02; -GPIO_PORTF_PCTL_R |= 0x50; -PWM1_2_CTL_R= 0x00000000; -PWM1_2_GENB_R |= 0x80E; -PWM1_2_LOAD_R = 0xA0; -PWM1_2_CMPB_R = 0x50; -PWM1_2_CTL_R |=0x01; -PWM1_ENABLE_R |=(1<<5); + +void GPIOF_Config() + { + SYSCTL_RCGC2_R |= 0x20; + GPIO_PORTF_LOCK_R = 0x4C4F434B; + GPIO_PORTF_CR_R = 0x1F; + GPIO_PORTF_DEN_R= 0x1F; + GPIO_PORTF_DIR_R= 0x0E; + GPIO_PORTF_PUR_R = 0x11; + + } + + + + + + + + + + + + + + + +