Search results

  1. M

    Pushing the limits with timers and interrupts on the Teensy 4.0

    Noted! thanks Paul. But It was just for debugging. So I guess that is okay:).
  2. M

    Pushing the limits with timers and interrupts on the Teensy 4.0

    I was checking out PIT recently on teensy 4.0. Although you can setup 4 different timers. It seems that you can use only one interrupt out of four PIT timers. you can change PIT_LDVALx = (Required time period * Timer Frequency) - 1. According to readings i got Timer Frequency is roughly 25Mhz...
  3. M

    Teensy 4.0 PORT manipulation to read/write data to multiple pins

    Based on those suggestion I tried this code. I changed the data before each cycle and used the return value. But still it is executing at the same speed. I am not familiar with ARM architecture is it capable of doing that operation so fast.#define IMXRT_GPIO6_DIRECT (*(volatile uint32_t...
  4. M

    Teensy 4.0 PORT manipulation to read/write data to multiple pins

    Can this be explained how these two take up same amount of time. I am confused....... const uint16_t mask1 = 0xcfcf;// 1100 1111 1100 1111; const uint16_t mask2 = 0x0030;// 0000 0000 0011 0000; const uint16_t mask3 = 0x3000;// 0011 0000 0000 0000; inline uint32_t read() { uint32_t data =...
  5. M

    Teensy 4.0 PORT manipulation to read/write data to multiple pins

    Woo, that looks somewhat tricky. Here I ran another test, i didn't print data. For some reason returning GPIO6_DR is slower than creating a local variable and returning it. It may make sense because local variables initialized dynamically will be created in ram. It might be executed faster...
  6. M

    Teensy 4.0 PORT manipulation to read/write data to multiple pins

    I noticed that you have used the GPIO6 for all the 16 bit, but some of those pins are on the backside of the board which are inconvinient to use. Also I mentioned the same in the readme file that 16bit and 24bit operations speed can be improved by using pins on the backside of the board. So I...
  7. M

    Teensy 4.0 PORT manipulation to read/write data to multiple pins

    I have noticed that lot of people been asking about port manipulation example code and I was also searching for the same. After reading some documentation I came up with these program to read/write multiple pins simultaneously at faster speed. This is my first attempt at creating something like...
Back
Top