martinsustek
Member
Hi,
I am developing a simple RGB PAL signal generator in Teensyduino.
I am using 64us IntervalTimer to trigger start of each picture line and then output pixels (bits) from RAM to a simple resistor DAC appended to teensy pins. Basically, it is similar hardware to AVGA project (http://avga.prometheus4.com/index.php?p=2-3). I am able to see a picture on TV, but there are still some graphical bugs and glitches. There are two of my biggest problems:
1. At the beginning of my line drawing routine, there is one IF which decides between outputting empty lines or picture data. And this means that first approx. 3 or 4 lines are delayed and image skewed a little bit. I assume that this is problem of changing branch prediction strategy. So I want to disable branch prediction in this if, in my routine or at all. According to Cortex-R4 documentation (http://infocenter.arm.com/help/topic/com.arm.doc.ddi0363g/Bgbficch.html), there is a possibility to disable branch prediction on R4. What about M4, is it possible to disable branch prediction on it?
2. Second problem is with graphical glitches which I think is generated by some other interrupts running on Tennsy (Teensyduino USB loader/serial terminal?). I am disabling interrupts in my drawing routine, but I think it is not get called as regularly as I need because of another interrupts running at the time when my routine should start. Are there any list of Teensy system interrupt routines and a possiblity to turn them off? I cannot disable interrupts at all, because I need them for that 64us IntervalTimer and I also need button firmware upload functionality.
I am developing a simple RGB PAL signal generator in Teensyduino.
I am using 64us IntervalTimer to trigger start of each picture line and then output pixels (bits) from RAM to a simple resistor DAC appended to teensy pins. Basically, it is similar hardware to AVGA project (http://avga.prometheus4.com/index.php?p=2-3). I am able to see a picture on TV, but there are still some graphical bugs and glitches. There are two of my biggest problems:
1. At the beginning of my line drawing routine, there is one IF which decides between outputting empty lines or picture data. And this means that first approx. 3 or 4 lines are delayed and image skewed a little bit. I assume that this is problem of changing branch prediction strategy. So I want to disable branch prediction in this if, in my routine or at all. According to Cortex-R4 documentation (http://infocenter.arm.com/help/topic/com.arm.doc.ddi0363g/Bgbficch.html), there is a possibility to disable branch prediction on R4. What about M4, is it possible to disable branch prediction on it?
2. Second problem is with graphical glitches which I think is generated by some other interrupts running on Tennsy (Teensyduino USB loader/serial terminal?). I am disabling interrupts in my drawing routine, but I think it is not get called as regularly as I need because of another interrupts running at the time when my routine should start. Are there any list of Teensy system interrupt routines and a possiblity to turn them off? I cannot disable interrupts at all, because I need them for that 64us IntervalTimer and I also need button firmware upload functionality.