Jump to content
43oh

LadyInRed

Members
  • Content Count

    12
  • Joined

  • Last visited

  1. Hi. I try to download a program in microcontroller and i receive the next error : CORTEX_M4_0: Trouble Reading Memory Block at 0x708 on Page 0 of Length 0x18: Debug Port error occurred. CORTEX_M4_0: Error: Debug Port error occurred. I use Tiva C Series LaunchPad EK - TM4C123XGL.
  2. Hi all. First of all i have made a program who blink a led. I use the interrupt of Timer0B interrupt. I enabled this interrupt with this instruction : IntEnable(INT_TIMER0B_BLIZZARD); This interrupt is defined in the header file hw_ints.h : #define INT_TIMER0B_BLIZZARD 36 // 16/32-Bit Timer 0B And program works very well. But now, i want to enable the same interrupt with another instruction : NVIC_EN1 = 0x00000010; In my program the Timer0B interrupt has number 36. in header file hw_nvic.h : #define NVIC_EN1 0xE000E104 // Interrupt 32-54 Set Enable
  3. Where LED = 0x08; void Timer0BIntHandler() { TimerIntClear(TIMER0_BASE, TIMER_TIMB_TIMEOUT); COUNTER++; GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, LED); if(COUNTER == NUMBER_OF_INTERRUPTS) { LED ^= 0x08; COUNTER = 0; } }
  4. I found a solution : void Timer0BIntHandler() { TimerIntClear(TIMER0_BASE, TIMER_TIMB_TIMEOUT); COUNTER++; GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, LED); if(COUNTER == NUMBER_OF_INTERRUPTS) { LED ^= 0x08; COUNTER = 0; } }
  5. Hi. I want to made a simple program who turn on/off a led. In the function below i must use the XOR operator in line : GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, 8); How can i write the XOR operation ? void Timer0BIntHandler() { TimerIntClear(TIMER0_BASE, TIMER_TIMB_TIMEOUT); counter++; if(counter == NUMBER_OF_INTS) { GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, 8); counter = 0; } }
  6. Hi. Can someone to recommend me some tutorials about ASM language CCS Stellaris LaunchPad LM4F120H5QR ? Thank you.
  7. Finally works. Thank you for your support. Thank you very much. One more question. In my opinion i think when i created the project i made a mistake. Like you said the driverlib isn't linked. If this file is linked i think is not necessary to made the modifications that you told me. Can you tell me how to do it ? Thank you.
  8. Hi, Yes in file hw_ints.h : #define INT_TIMER0A_TM4C123 35 // 16/32-Bit Timer 0A So i made this modification : IntEnable(INT_TIMER0A_TM4C123); - and regardles at this i am not receive any kind of error. But in this moment i receive many errors and i think is not because of that modification, but in the same time i have included all header files where are defined predefined functions. #10010 errors encountered during linking; "LM4F - LaunchPad - 04.out" not built LM4F - LaunchPad - 04 C/C++ Problem unresolved symbols remain LM4F - LaunchPad - 04 C/C++ Problem
  9. The issue is that the blue led is not blinking. i dont understand why ? It is possible to be a problem with interrupts ?
  10. Hi. I try to test a program from "Getting Started with the Stellaris EK-LM4F120XL LaunchPad Workshop", lab 4 "Interrupts and the Timer" (see : ).I dont understand what is the mistake. Look at this code : #include<stdio.h> #include<stdbool.h> #include<stdint.h> #include"inc/hw_ints.h" #include"inc/hw_memmap.h" #include"inc/hw_types.h" #include"driverlib/sysctl.h" #include"driverlib/interrupt.h" #include"driverlib/gpio.h" #include"driverlib/timer.h" int main() { unsigned long ulPeriod; SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN)
  11. Hi. I have the next code : #include<stdint.h> #include<stdbool.h> #include"inc/hw_types.h" #include"inc/hw_memmap.h" #include"driverlib/sysctl.h" #include"driverlib/gpio.h" int main() { int LED = 4; SysCtlClockSet(SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_OSC_MAIN); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3); while(1) { GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, LED); SysCtlDelay(2000000); { LED ^= 4; } } } In this code i have the n
  12. Hi, guys. I am a beginner in Stellaris microcontroller programming. I try to generate a delay of 1 sec (1 sec - led ON, 1 sec - led OFF). I have selected the timer0A - 16 bits. Delay - 1sec. Frequency = 4 MHz T = 1 / 4Mhz = 250 nsec. So, to generate a delay of 1 sec : 1.000.000.000 nsec / 250 nsec = 4.000.000 4.000.000 = 62.500 * 64; But i think in my code i must set another bit, i dont know if it is correct, his name "main interrupt". Here is my code :
×
×
  • Create New...