Fiskusmati
Active member
Hello.
What I'm trying to achieve:
-2x 16bit parallel ADC connected to GPIOS (32 GPIOS used)
-probe 32GPIO states and save them in memory (array with 10 000 records). Each measurement must be taken after external interrupt occurs on GPIO (about 1 000 000 samples per second)
-after 10 000 records are collected (40 000 bytes) send them through Ethernet via UDP
-generate square wave 1MHz on one GPIO
Issue: sending that amount of data through Ethernet on teensy is blocking. It does take some time eg. 500uS. So I lose 500 measurements. I thought with PHY Ethernet it will take nanoseconds and not block my program.
Normally I would use ESP32, one core for taking measurements, another for UDP sending. But I need cable stable Ethernet connection (a lot of data that WiFi won't handle) and I need a lot of GPIO pins.
Teensy does not have second core, but maybe there is a solution? RTOS?
Or maybe I can still interrupt while data is sent through UDP, and take measurements (read gpio stated and put them in memory)?
I'm using RJ45 connector with magnetics inside, soldered directly to the teensy board.
Regards Mateusz
What I'm trying to achieve:
-2x 16bit parallel ADC connected to GPIOS (32 GPIOS used)
-probe 32GPIO states and save them in memory (array with 10 000 records). Each measurement must be taken after external interrupt occurs on GPIO (about 1 000 000 samples per second)
-after 10 000 records are collected (40 000 bytes) send them through Ethernet via UDP
-generate square wave 1MHz on one GPIO
Issue: sending that amount of data through Ethernet on teensy is blocking. It does take some time eg. 500uS. So I lose 500 measurements. I thought with PHY Ethernet it will take nanoseconds and not block my program.
Normally I would use ESP32, one core for taking measurements, another for UDP sending. But I need cable stable Ethernet connection (a lot of data that WiFi won't handle) and I need a lot of GPIO pins.
Teensy does not have second core, but maybe there is a solution? RTOS?
Or maybe I can still interrupt while data is sent through UDP, and take measurements (read gpio stated and put them in memory)?
I'm using RJ45 connector with magnetics inside, soldered directly to the teensy board.
Regards Mateusz
Last edited: