HI
i just brought tiva c series launch pad board and upload the in c for red led blink it works but when i upload same code in assemble for red led blink is not working so i think problem with code.
upload previous red led blink code in c it stop working . now led is not working with any code.
can somebody help me solve this issue
code in c
#include<stdint.h>
#include "TM4C123.h"
void delayms(int time);
void delayms( int time)
{
int x,y;
for(x = 0;x<time;x++)
{
for(y = 0;y<7900;y++);
}
}
int main()
{
SYSCTL->RCC |=0X2400540;
SYSCTL-> RCGCGPIO |= 0X20;
GPIOF->DIR |=0X01;
GPIOF->DEN |=0X01;
while(1)
{
GPIOF -> DATA = 0X01;
delayms(1000);
GPIOF -> DATA = 0x00;
delayms(1000);
}
}
code in assemble
SYSCTL_RCGCGPIO_R EQU 0x400FE608
GPIO_PORTF_DIR_R EQU 0x40025400
GPIO_PORTF_DEN_R EQU 0x4002551C
GPIO_PORTF_DATA_R EQU 0x400253FC
AREA |.text|,CODE,READONLY,ALIGN=2
THUMB
EXPORT main
main
BL GPIOF_Init
loop BL LIGTH_ON
B loop
GPIOF_Init
LDR R1,= SYSCTL_RCGCGPIO_R
LDR R0,[R1]
ORR R0,R0, #0x20
STR R0,[R1]
LDR R1,= GPIO_PORTF_DIR_R
MOV R0,#0x02
STR R0,[R1]
LDR R1,= GPIO_PORTF_DEN_R
MOV R0,#0x02
STR R0,[R1]
BX LR
LIGTH_ON
LDR R1,= GPIO_PORTF_DATA_R
MOV R0,#0x02
STR R0,[R1]
BX LR
ALIGN
END