goto across functions/isrs?

Started by galapogos in comp.arch.embedded13 years ago 37 replies
ISR

Hi, Is it possible to goto a label that's not in the same functions? I've always been taught that gotos are evil so I don't have much...

Hi, Is it possible to goto a label that's not in the same functions? I've always been taught that gotos are evil so I don't have much experience with it, but I'm currently in a situation where I think I might have to use it. I have an ISR that triggers when I detect an event, and based on that event I want to unconditionally goto a label that's in main(). Is that possible? If so what's th...


arm-elf-gcc building erroneous code for ISR (long posting)

Started by Jens Hildebrandt in comp.arch.embedded15 years ago 4 replies

Hello group, I'm curently trying to get familiar with the ARM7 by building some example-projects for a LPC2106-controller. One such project...

Hello group, I'm curently trying to get familiar with the ARM7 by building some example-projects for a LPC2106-controller. One such project is the blinky_irq example from Keil which should demonstrate the use of interrupts and of the LPC2xxx vectored interrupt controller. I'm using gcc-3.2.1 with binutils 3.13.1 and newlib 1.11.0 . So far I had no problems with these tools and I was abl...


Interrupt not firing on PIC18F

Started by namezmud in comp.arch.embedded15 years ago 1 reply

I've started tinkering with a PIC18F4680 (with CAN bus) using microchips MPLAB C18 C compiler. I've been beating my head against a problem for...

I've started tinkering with a PIC18F4680 (with CAN bus) using microchips MPLAB C18 C compiler. I've been beating my head against a problem for many hours now :evil: . I can't get interrupts to work. I have tried, TMR0, TMR1 and INT0. I have verified that TMRnIP, TMRnIE, TMRnIF and GIEH & IPEN are all HIGH yet my ISR does not get run. If I clear TMRnIF in the main loop TMRnIF is set aga...


STM32F4 DMA question

Started by Tim Wescott in comp.arch.embedded6 years ago 11 replies

So I'm running into a response time issue on a serial port on an STM32F407. I was hoping that I could give myself more time to get to the ISR...

So I'm running into a response time issue on a serial port on an STM32F407. I was hoping that I could give myself more time to get to the ISR by piping the UART receive to the DMA. I got it set up to what appeared to be correct according to the user's manual, and what I ended up with that the DMA will transfer exactly one byte from the UART, then turn itself off. This may give me a ...


C18, PIC18F252: Setting timer0 with an interrupt ?

Started by Rodo in comp.arch.embedded16 years ago 6 replies

Hi all... I'm trying to set up timer0 to time about 10ms and inc a global variable that gets displayed on an LCD. Everything is pretty much...

Hi all... I'm trying to set up timer0 to time about 10ms and inc a global variable that gets displayed on an LCD. Everything is pretty much working except that I can't change the time out value for timer0. I init the timer before a while loop that display the variable "time". The isr inc the value on every time out of timer0. It also toggles RB4 so I can check the freq (for testing). The ...


Regarding cold boot and SDRAM status

Started by ssubbarayan in comp.arch.embedded13 years ago 1 reply

Dear all, Recently happened to investigate an exception issue due to raising of exceptions from ISRs. I am using ARM based custom processor...

Dear all, Recently happened to investigate an exception issue due to raising of exceptions from ISRs. I am using ARM based custom processor with vxworks 5.5.I have the following doubt: The vxworks manual states that when ever an exception happens from ISR the system will get rebooted and it will print the reason behind exception on system console. My doubt is where exactly in physical me...


TI MSP430 -- IAR compiler isr...

Started by Mike V. in comp.arch.embedded16 years ago 2 replies

I am very very new to the IAR compiler for TI's MSP430. I have seen tutorial code that says something like: interrupt[BASICTIMER_VECTOR] void...

I am very very new to the IAR compiler for TI's MSP430. I have seen tutorial code that says something like: interrupt[BASICTIMER_VECTOR] void my_isr() { ... } However, the compiler, with its current settings won't interpret it correctly. I have to type the more tedious statement: #pragma vector 0x00 __interrupt void my_isr() { ... } What is the setting i have to change or inc...


Question About C6713 DSP EDMA

Started by ratemonotonic in comp.arch.embedded11 years ago

Hi All , Can any one with experience with TI C6713 help me understand EDMA operation. I am using the C6713 DSK with AIC23 codec on board. I...

Hi All , Can any one with experience with TI C6713 help me understand EDMA operation. I am using the C6713 DSK with AIC23 codec on board. I am using the dsk_app application from the example directory of the CCS installation. The example runs out of the box i.e. EDMA ISR was hit both for RX and TX transfer completion. I also put a sine wave in the line in and varified a sine wave on th...


Using Interrupt driven serial Port on 8051

Started by Makhan in comp.arch.embedded15 years ago 12 replies

Hello all, I have a very typical problem with a twist. Here goes: I have a main loop running a piece of code. However, upon...

Hello all, I have a very typical problem with a twist. Here goes: I have a main loop running a piece of code. However, upon receiving character '0' from serial port (or any 8bit code for that matter), I want to read 8 or 16 or lets say n number of bytes from serial port. So here is what I did, I created an updateFlag bit which gets set whenver the true code is reached and the ISR quits...


SPI problem

Started by pachu in comp.arch.embedded15 years ago 5 replies

Hi all, We are stuck here with the spi problem. We have with us two AT89C51ED2 boards. We trying some small experimentation on the SPI...

Hi all, We are stuck here with the spi problem. We have with us two AT89C51ED2 boards. We trying some small experimentation on the SPI before we start our actual work. The board have a 40MHz crystal. We want to use one board as MASTER and other as the SLAVE. Problem is when we transmit something from the MASTER we are not able to read the same value from the slave ISR. I have put ...


How interrrupts are handled (works) ? (internally)

Started by visweswara in comp.arch.embedded13 years ago 5 replies

Hi, I have a fundamental question of how interrupts in uC/uPs actually works? Many tell what happens when interrupts occur , like the...

Hi, I have a fundamental question of how interrupts in uC/uPs actually works? Many tell what happens when interrupts occur , like the program flow changes from the main program to ISR. But how exactly this happens without the interference of CPU? What I understand is interrupt gets the attention of CPU without CPU keeping watch over Interrupt Signal. How is this done. I hope interrupt c...


Serial driver implementation questions

Started by joshc in comp.arch.embedded13 years ago 2 replies

I'm implementing a serial transmit driver for a micro that isn't running an RTOS and I have some form of an implementation working but I'd like...

I'm implementing a serial transmit driver for a micro that isn't running an RTOS and I have some form of an implementation working but I'd like some advice on it. Just a note, the function "getc" is a bit confusing here because it isn't for received characters but rather is a way for the UART empty ISR to get characters to send out. Here's the pseudocode for my implementation: char txBuffe...


Small footprint RTOS for embedded system

Started by SteveM in comp.arch.embedded12 years ago 31 replies

I am looking for a free commercial usage & open source RTOS with small footprint. I want RTOS to be very small preferably

I am looking for a free commercial usage & open source RTOS with small footprint. I want RTOS to be very small preferably


UARTs and interrupts

Started by Ross Marchant in comp.arch.embedded14 years ago 26 replies

Hi all, I have been writing code for the ds80c320 and xa-g49 and need a few questions answered that i'm unsure about. 1. Say i have timer 0...

Hi all, I have been writing code for the ds80c320 and xa-g49 and need a few questions answered that i'm unsure about. 1. Say i have timer 0 set to interrupt on overflow. If in another interrupt routine I disable all interrupts, then timer 0 happens to overflow, and then I enable all interrupts, while the timer 0 overflow isr then run, or was it missed? *** I use interrupt driven se...


68hc12 TOVF interrupt problems ICC12

Started by Marcipicus in comp.arch.embedded10 years ago 3 replies

I'm trying to get the timer overflow interrupt working on the hc12 dp256b but so far I haven't had any luck. The overflow interrupt is never...

I'm trying to get the timer overflow interrupt working on the hc12 dp256b but so far I haven't had any luck. The overflow interrupt is never generated in my program(used a breakpiont in isr) and I can't find the logic error in my code. Here is my work environment: CHIP: hc12dp256 COMPILER: ICC12 DEBUGGER: NOICE Here's the code that doesn't work ----------------------------------...


trouble understanding RETI instruction

Started by jack_e in comp.arch.embedded9 years ago 19 replies

Hi I am having trouble understanding RETI instruction. Being a novice at MSP430 architecture, have begun exploring by writing simple snippets....

Hi I am having trouble understanding RETI instruction. Being a novice at MSP430 architecture, have begun exploring by writing simple snippets. I am trying to blink a LED using a timer. I want to control the dutycycle of the flashing. My query is that after exiting the ISR on RETI, which instruction does the control flow go to. Have tried debugging via different methods but its still unclear. ...


[cross-post] nested interrupts

Started by alb in comp.arch.embedded7 years ago 43 replies

Dear all, I would like to understand more about nested interrupts since it looks to me they break my code and I'm not sure why. I have...

Dear all, I would like to understand more about nested interrupts since it looks to me they break my code and I'm not sure why. I have three 'items' in my software: a serial port, a fifo and a timer. The serial port is an external hardware that sends back an interrupt when it's free to send another byte, so I decided to have an interrupt service routine (ISR) that reads from the fifo and...


How to manipulate a receiving buffer

Started by Steven Woody in comp.arch.embedded12 years ago 42 replies
ISR

i am writting problem to receive data from a interrupt-driven serial port, and i think my code will always have change of lossing data. in the...

i am writting problem to receive data from a interrupt-driven serial port, and i think my code will always have change of lossing data. in the receving ISR, i get a byte from a register and put it into a buffer, static unsigned char buff[ BUFF_SIZE ]; static buff_len = 0; __interrupt on_byte_in( void ) { if ( buffer_len < sizeof( buff ) ) buffer[ buffer_len++ ] =


Atmega162: to check the Timer0 ticking

Started by Roman Mashak in comp.arch.embedded15 years ago 5 replies

Hello, All! When I initialize Timer0/1, how can I check amount of time spent by timer ticking, for example, if timer is configured for 10ms,...

Hello, All! When I initialize Timer0/1, how can I check amount of time spent by timer ticking, for example, if timer is configured for 10ms, how can I verify that 10ms really have gone. I suppose, I can attach probe of oscilloscope to pin1 of ATmega162 (according to datasheet it's OC0), but I don't see anything. Here is my code: ... // ISR for Timer0 SIGNAL(SIG_OUTPUT_COMPARE0) ...


How can this wild interrupt occur?

Started by Chris Carlen in comp.arch.embedded14 years ago 1 reply

Hi: I am trying to selectively disable an interrupt during a sequence of code where I don't want that interrupt to occur, on a TMS320F2812...

Hi: I am trying to selectively disable an interrupt during a sequence of code where I don't want that interrupt to occur, on a TMS320F2812 DSP. The interrupt is CPU Timer0, and the code of interest is within another interrupt, EVB Timer4's compare match interrupt. This T4CINT ISR must be preemptable by EVA Timer2 interrupts, so I cannot globally disable interrupts here. Just need to...