Search results

  1. D

    Teensy 3.1 for Frequency measurement

    Can I get a hint to deal with two 32 bit counter (max 10 MHz) and synchronization (D-FF) using Teensy 3.1 & software? Actually, now I am considering Cypress PSoC instead of uC+FPGA.
  2. D

    Teensy 3.1 for Frequency measurement

    Thanks Paul. After a long time, I received a reasonably simple answer. Actually, I need two 32 bit counters and some synchronization. As, it might be difficult to do using only Teensy, I started looking for open source, low cost FPGA boards.
  3. D

    Teensy 3.1 for Frequency measurement

    Sorry, the post might look to be very basic. But, I didn't want any tutorial. Actually, my requirement is much complicated than simple frequency measurement. But, I wanted to start with the basic. It is clear from Paul's post that there is no easy way to do FreqCount in Teensy 3.x. I have gone...
  4. D

    Teensy 3.1 for Frequency measurement

    In one of my projects, I need to measure frequency of external digital pulses. The pulse rate could be up to 1 MHz with duty cycle of 30 - 70%. How should I go about it? Which pin to use for external input? How to configure 32 bit counter? Also, how to generate precise 1 sec gate period?
  5. D

    Teensy 3.1 ADC with DMA

    These lines were not there in the posted setupADC(). I included them later on. Even though the sequence of those lines posted was correct, but whil testing I wrote them in reverse order. When corrected DMA started working. It seems ADC sampling rate improves a little with DMA.
  6. D

    Teensy 3.1 ADC with DMA

    Well, I have set ADC continuous mode at the end of setupADC() by ADC0_SC3 |= ADC_SC3_ADCO; and ADC0_SC1A = channel; With this change too DMA request does not start (no toggling of pin 3). But if I do repeated analogRead() in loop() it triggers the dma_ch2_isr. Thanks Pedvide, it is...
  7. D

    Teensy 3.1 ADC with DMA

    I am trying to use DMA when the ADC is running in continuous mode. But, there seems to be some problem. I am using part of the code from Audio.cpp. I have used software trigger and continuous mode for ADC. Also DMA request is enabled for ADC. The DMA setup code is as in Audio.cpp (line 1003...
  8. D

    Teensy 3.1 ADC with DMA

    Making Sample time Short (ADC_CFG1_ADLSMP = 0), I am getting for hardware average of 32 - 16 bit and 8 bit ADC sampling rate (AVG 32) = 464 kSPS ADC sampling rate (AVG 32) = 1299 kSPS
  9. D

    Teensy 3.1 ADC with DMA

    Paul, you have used hardware trigger in audio library for sampling at a specific rate. When it is running in continuous mode, can ADC data can be stored at every EOC with DMA?
  10. D

    Teensy 3.1 ADC with DMA

    By default Teensy 3.1 is running with Continuous Conversion (free-running) Enabled (check ADCx_SC3, x = 0 & 1). Strangely, setting High-Speed Configuration mode (ADHSC bit in ADCx_CFG2) reduces the sampling rate. So, probably conversion rate cannot be improved much. I would like to use ADC DMA...
  11. D

    Teensy 3.1 ADC with DMA

    I have used a very simple code to find sampling rate of the ADC at 16 bit resolution and at different hardware average count (1 to 32). #define RES 16 // change HARDWARE AVG to 1, 2, 4, 8, 16, 32 #define AVG 2 #define CNT 160000 / AVG void setup() { Serial.begin(115200)...
  12. D

    Teensy 3.1 ADC with DMA

    I am very new to Teensy. I have received my Teensy 3.1 recently. I have used analogRead for reading analog input. I need to read analog input at its fastest speed. I understand, DMA would be the only option. I have used DMA with Arduino Due to run at 1 MBPS using help from here . Have anybody...
Back
Top