T4.1 is a really complex device, and maybe not the best choice to learn embedded "from the ground up". If you start with something simpler, you'll have fewer features and less code to understand, and you can work you way up in complexity. SAMD21...
Okay, it's working so far.
On an old ESP32 A1S1(not an S3):
Core 0 (rtos, Wi-Fi, MP3, AAC) is currently using 59% of the CPU, and Core 1 (user code + audio library, connections, statistics, I2S + DMA handling, etc.) is using 7%.
- for an MP3...
Various. I think Claude is the best, but ChatGPT does a good job, too. Gemini is good sometimes, but on other days it hallucinates too much.
I’m currently porting the audio library to the ESP32. The AIs are a huge help there and really take a lot...
I don't know why your sketch doesn't work, but the sketch below does. When I run your sketch, it does not reliably complete logging, and rather than figure out why, I went back to one of my own sketches. This one started from the 1MSPS logger by...
Pretty sure this is not correct (i.e. that documentation is obsolete), because I've done it successfully with the latest TeensyDuino. Let me see if I can break it out into a working sketch.
Add a call to MTP.reset() beefore entering the loop that calls MTP.loop(). I don't know the internals, but I think it causes the host to update its directory listing.
Glad to see you are using RingBuf and preAllocate() and checking file.isBusy()...
It‘d probably be worth testing the cheap unit using the FreqMeasure library; that should resolve to about 6.7ns, since it uses a 150MHz clock. And of course will be unaffected by interrupt latency.
Have you tried a 74LVC04 on your splitter...
Claude says it's undefined behavior, as opposed to strictly being an error. It says a lot more about why, but I'm not comfortable repeating what AI says. There is a compiler option to promote the warning to an error.
Perhaps I should have said it's an unexpected difference in the FreqCount library between T3 and T4. I think there is at least one example sketch the mentions the use of usec for T4 versus msec for T3.
May I suggest:
try one of the NativeEthernet UDP examples
try one of the QNEthernet UDP examples
NativeEthernet has not been supported/updated by the author in quite a few years, whereas QNEthernet has active support/development. You might need...
@shawn, are you working through the T4.x peripheral set? Can you summarize which you've implemented so far? The timer peripherals are really the ones where I've done any significant work at the register level.