aweasomeasmus
Member
Hello,
I'm trying to generate a precise 2Mhz Manchester encoded waveform with the Teensy 3.2. The waveform is correct most of the time, but sometimes there appear to be a timing glitch. The waveform will be stuck in high or low state for 0.5-1 us and then continue as previously.
I have tried to generate a waveform purely in inline assembly with just alternating 0 and but the issue is still there.
The assembly code to generate waveform:
Below is a lin to a video to show what i'm seeing.
https://www.dropbox.com/s/auj2msx38d2itdd/20180706_145514.mp4?dl=0
Does anybody have clue what the problem could be. Maybe some interrupt, although i have tried in all kinds of ways to diasble them.
Any help would be greatly appreciated. Thank you in advance!
I'm trying to generate a precise 2Mhz Manchester encoded waveform with the Teensy 3.2. The waveform is correct most of the time, but sometimes there appear to be a timing glitch. The waveform will be stuck in high or low state for 0.5-1 us and then continue as previously.
I have tried to generate a waveform purely in inline assembly with just alternating 0 and but the issue is still there.
The assembly code to generate waveform:
Code:
asm volatile (
"MOV r10,#0x28" "\n\t"
"1:" "\n\t"
"MOV r11,#0x40000000" "\n\t"
"ORR r11,#0x000F0000" "\n\t"
"ORR r11,#0x0000F000" "\n\t"
"ORR r11,#0x00000080" "\n\t"
"MOV r2, #0x80" "\n\t"
"STR r2, [r11]" "\n\t"
"MOV r12, #13" "\n\t"
"2:" "\n\t"
"MOV r0,r0" "\n\t"
"SUBS r12, r12, #1" "\n\t"
"bne 2b" "\n"
"MOV r0,r0" "\n\t"
"MOV r11,#0x40000000" "\n\t"
"ORR r11,#0x000F0000" "\n\t"
"ORR r11,#0x0000F000" "\n\t"
"ORR r11,#0x00000080" "\n\t"
"MOV r2, #0x10" "\n\t"
"STR r2, [r11]" "\n\t"
"MOV r12, #12" "\n\t"
"2:" "\n\t"
"MOV r0,r0" "\n\t"
"SUBS r12, r12, #1" "\n\t"
"bne 2b" "\n"
"MOV r0,r0" "\n\t"
"MOV r0,r0" "\n\t"
"MOV r0,r0" "\n\t"
"SUBS r10, r10, #1" "\n\t"
"bne 1b" "\n"
);
Below is a lin to a video to show what i'm seeing.
https://www.dropbox.com/s/auj2msx38d2itdd/20180706_145514.mp4?dl=0
Does anybody have clue what the problem could be. Maybe some interrupt, although i have tried in all kinds of ways to diasble them.
Any help would be greatly appreciated. Thank you in advance!