Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Control Platform Based on Teensy+FPGA

  1. #1
    Junior Member
    Join Date
    Aug 2020
    Posts
    3

    Control Platform Based on Teensy+FPGA

    Hi everyone, I'm a power electronics engineer and I'm looking for information about the Teensy. I'm starting to learn about MCU and embedded system.

    I really like the Teensy capability but I would like to know if it's possible to develop a high speed communication with a FPGA. The FPGA will be used for periphericals, like several ADCs and pulses from PWM schemes (designed in the FPGA). The teensy unit will be used just for signal processing.

    Previously, I've worked with the TMDSDSK6713 with a FPGA connected in the EMIF BUS. It works well but now I'm having issues with the computational burden in the DSP. For your information, that is all my experience regarding DPS or MCU units.

    Regarding my requirements, is it feasible to use most of the GPIO of the teensy 4.0 (or 4.1) to communicate with the FPGA ?. How fast can be this type of implementation?. Is it a real improvement in terms of the speed computation over the previous control platform (TMDSDSK6713 +FPGA)?.

    I will really appreciate any observation of this query.
    Thank you !
    Matias

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    110
    Tell us more about the implementation details. Is the FPGA talking to the Teensy using analog, digital, or both? How many I/O channels do you need?

    For digital communication, the Teensy has a DMA controller, so you can send and receive arbitrary data very quickly without the CPU itself burning cycles. Of course, it also speaks various serial formats (I2C, SPI, UART).

  3. #3
    Junior Member
    Join Date
    Aug 2020
    Posts
    3
    Hi, thank you for your reply. I want only digital communication.

    The FPGA has to measure about 40 signals (using external ADCs) and have to send about 55-60 gating pulses to the power converter (actuator).
    I intend to use the teensy just for signal processing (to compute the inherent control algorithms for regulating the converter variables).
    The FPGA gives the measurements from the ADC to the Teensy, then the unit does the control algorithm and send back the references for the PWM schemes that are built-in the FPGA. Additionally, the FPGA sends an interrupt signal to the Teensy which allows the start the control routine.

    Therefore, I want a high bandwidth communication between the FPGA and the teensy unit because the available time for computation is around 200-650micro seconds.

    Thanks again for your interest

  4. #4
    Senior Member
    Join Date
    Jul 2020
    Posts
    110
    So, the FPGA is going to send ~40 variables to the Teensy, and the Teensy is going to run PID or deadtime or something like that (just guessing) and then tell the FPGA what duty cycle to run its PWM generators at. When the FPGA has some data for the Teensy, it will raise an interrupt line. Is that about right?

    How many bytes do you need to transfer per second? 40 floats (of whatever precision) are not heavy to transfer. 40 16-bit floats transferred every 1 millisecond is only 80KB (naively, not taking into account framing or whatever) and SPI will let you transfer up to 10 megabits (over 1MB) per second. If your data xfer requirements would outstrip that, you could use DMA. I'm pretty sure you can use an interrupt line to trigger that.

    SPI should be adequate to do what you want, unless you are running much faster than 1,000 transmissions per second. (I am guessing that you aren't, based on having up to 650 microseconds to answer.)

  5. #5
    Junior Member
    Join Date
    Aug 2020
    Posts
    3
    Quote Originally Posted by Pilot View Post
    So, the FPGA is going to send ~40 variables to the Teensy, and the Teensy is going to run PID or deadtime or something like that (just guessing) and then tell the FPGA what duty cycle to run its PWM generators at. When the FPGA has some data for the Teensy, it will raise an interrupt line. Is that about right?

    How many bytes do you need to transfer per second? 40 floats (of whatever precision) are not heavy to transfer. 40 16-bit floats transferred every 1 millisecond is only 80KB (naively, not taking into account framing or whatever) and SPI will let you transfer up to 10 megabits (over 1MB) per second. If your data xfer requirements would outstrip that, you could use DMA. I'm pretty sure you can use an interrupt line to trigger that.

    SPI should be adequate to do what you want, unless you are running much faster than 1,000 transmissions per second. (I am guessing that you aren't, based on having up to 650 microseconds to answer.)
    Thank you for your answer. Personally, I would like to achieve the fastest communication between the units. Thank you again !.
    Matias

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •