I have a data logging problem, but it's really a debugging problem. I'm trying to find unexpected behavior (which I get every few days) and log a lot of data to find the problem. USB isn't so great for this, as there's a bit of blocking, at least from reading the code. I can't have my critical ISR's blocked for longer than 6us, or I miss a count. I'm controlling motors on a lathe, so count failures can result in damages to both me, and my lathe, or someone else's.
Is Ethernet a reasonable answer? Can Teensy 4.1 achieve the full maximum transmit rate for minutes (up to an hour)? A long time ago, I determined the max data payload for TCP/IP was 0.786 * the full link rate. The rest was overhead. So that would be 78.6 Mbps? Or about 9.8 MB/sec? Do I simply fill a buffer and when it is an MTU (1500 bytes) it sends it? (I implemented something like this in C using sockets in 2009, but time has dulled the memory.) Is there more, or less blocking in Ethernet than USB on Teensy 4.1? Can QNEthernet do this?
Just logging where I am in the code with a time stamp is generating 1.18MB/s, and I haven't even begun logging the interesting stuff, or variables, where the bugs are lurking. The rates are well over the link capacity of HW serial / FTDI of 3 Mbps, if I am understanding correctly.
At this point, searching for some ideas to facilitate logging, or an alternate approach. I'm fishing for any info, as I'm running out of ideas. Any insight, tips, clues, or help would be appreciated.
Is Ethernet a reasonable answer? Can Teensy 4.1 achieve the full maximum transmit rate for minutes (up to an hour)? A long time ago, I determined the max data payload for TCP/IP was 0.786 * the full link rate. The rest was overhead. So that would be 78.6 Mbps? Or about 9.8 MB/sec? Do I simply fill a buffer and when it is an MTU (1500 bytes) it sends it? (I implemented something like this in C using sockets in 2009, but time has dulled the memory.) Is there more, or less blocking in Ethernet than USB on Teensy 4.1? Can QNEthernet do this?
Just logging where I am in the code with a time stamp is generating 1.18MB/s, and I haven't even begun logging the interesting stuff, or variables, where the bugs are lurking. The rates are well over the link capacity of HW serial / FTDI of 3 Mbps, if I am understanding correctly.
At this point, searching for some ideas to facilitate logging, or an alternate approach. I'm fishing for any info, as I'm running out of ideas. Any insight, tips, clues, or help would be appreciated.