interrup high speed

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 good afternoon

   

My application is decoding a serial data frame, it has a frequency of 1MHz. I need to generate an interrupt whenever there is a rising edge and a falling edge (1MHz). I have read the reference manual, also AN54460, and works by placing the interruption to digital input pin to a frequency of 10kHz. If the digital input signal is above this interruption of 10Khz not work. Theoretically interruption should not depend on the frequency, but do not know what might happen. I urgently need help from someone

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When you upload here your project so that we all might have a look at we could probably give you some advice. Please use the "Create Workspace Bundle" (minimal) function of Creator 2.2.

   

 

   

Bob

   

 

   

PS Good afternoon? My watch shows 22:05, it is pitch dark outside.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The interrupt latency in Cortex M3 is 12 cycles, take a look at this -

   

 

   

http://www.arm.com/files/pdf/introToCortex-M3.pdf page 7

   

 

   

Additionally the ISR latency is a function of what you do in it. Hopefully

   

you are not calling any API's from within it, which results in stack push,

   

and of course the latency due to the API code. Normally what you want

   

optimally is to set a flag in ISR and return, and then process in main.

   

 

   

It is incorrect to assume ISRs are not sensitive to rate, they get

   

latched by HW but other processes and ISR activity may rob MIPS from

   

CPU to service. I assume your priority is highest level for this ISR.

   

 

   

Lastly at 1 Mhz you need to count cycles in code to see what your latency

   

is. If it is too great then resort to HW to handle the sampling of the data I

   

assume you are doing. Verilog of course very useful here.

   

 

   

Regards, Dana.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

 Good afternoon, I am Colombian, I dont have good English, I hope  you understand

   

I will comment that my project is to know how I can help.

   

 

   

I have two rotary encoder, they send the absolute position by a frame of serial data by a Manchester code, the encoders are of 11 bits.

   

 

   

To get the position, I decode the signal. The Manchester decoder is not the problem, the problem is the timing, and for that I get a interrup for rising edge  and falling edge  to synchronize the decoder.

   

The delivery code encoder is shown in Figure

   

   

I must get the data (15 bits) of the first frame.

   

I do not know what idea you have to be able to help.

   

   

Attached two codes

   

One simulates the clock and then with a interrup on and off an output pin.

   

The other has a signal input to the decoder.

   

 

   

none works.

0 Likes
Anonymous
Not applicable
0 Likes