I think that is what BriComp is doing with Visual Micro. There is also the TeensyDebug library on github. I haven't used either, so I can't provide any guidance on usage, but I have the impression that Visual Micro has a UI for debugging, whereas...
Not sure what you're asking here. Why doesn't Teensy have a hardware debugging interface? My understanding is it's mainly because (a) debugging is not a standard feature in the Arduino world, and (b) the closed-source bootloader is a major aspect...
Yes, there are many threads on this topic. There is no easy solution for hardware-based debugging. The hardware debug interfaces are not readily available. If you're interested in GDB-style debugging, search for messages by @BriComp. He uses it...
I've added an example which should help. It shows how to connect 4 cards using 2 SPI ports and the built in SDIO socket.
#include <SD.h>
const int cs_pin = BUILTIN_SDCARD; // socket on Teensy 4.1
const int cs1_pin = 0;
const int cs2_pin =...
I made the changes and added the MTP stuff in. I selected 'Serial + MTP' as I need both. Had a small glitch on compiling as it looks like MTP grabs some of RAM2, which I use as a secondary buffer when logging. I just reduced my buffer size a bit...
You're welcome. When Paul says that SD is a "thin wrapper" for SdFat, what that means is that SD fully contains SdFat. In other words, when you #include <SD.h>, you get all of SdFat, but it's inside the SD class, and you access it through the SD...
@slash2, the program below is the SdFat bench example modified to use #include <SD.h>. I think you should be able to make the same changes ot your program. Here's a summary:
replace #include "sdfat.h" with #include <SD.h>
delete all of the SdFat...
Thanks for the correction. To keep things clear, I didn't copy the entire code from my Jeannie_2 project.
I just wanted to show a simple example of how to quickly and easily read encoders using an MCP23017.
Thank you for posting this example.
For anyone who wants to run the example code, I had to make some small changes for the code to compile
add a few macros and variables that were not defined
comment out calls related to tft display
//...
A simple pattern that works well is:
1. On boot, let `TimeLib` read from the Teensy RTC:
```cpp
time_t getTeensyTime() { return Teensy3Clock.get(); }
void setup() {
setSyncProvider(getTeensyTime);
setSyncInterval(300);
}
2...
Always glad to hear of folks using FlasherX. I really should release it as a proper library and deal with these few nagging issues.
If your program is not very large, set reserve to 64 sectors (same as 4.1) which will be more than enough. I’ll...
@BriComp, if you ever have time, it would help so much if you would put together a set of step-by-step instructions for installing Visual Studio and whatever other components are required. I've tried a couple of times and I just don't understand...
Since all of pins 1-6 are eFlexPWM, you could set some of them to be edge-aligned and some center-aligned. At 50% duty cycle they would be 90 deg out of phase. The eFlexPWM peripheral is pretty complex, but the eFlexPWM library (github) was built...
If you have configured an interrupt on the rising edge of CLK, 80 MHz is too fast. That would mean interrupt enter/read/exit in 7.5 CPU cycles, which is not possible. The highest you could achieve this way is 10-20 MHz. Someone else will have to...
Yes, that's right, except that the HEX (or EHEX) file is being parsed. The contents of each Intel Hex record are extracted and written to unused flash memory. When that process is complete, the lower flash is erased, new code is copied from upper...
I don't know of any "common" reasons for Teensy 4.1 flash failure. Are you using the flash for data storage? Is the Teensy 4.1 subject to any shock loads?
Maybe so, but we often see posts that take the form “AI generated this code. Can someone tell me why it doesn’t work?”
Nobody wants to trouble-shoot code for someone who hasn’t put in some effort on their own.
I haven’t gone any further snd will have to go back to see how I fixed this most recent issue. Since I don’t actually use TeensyStep, the only way I can help is if users provide example sketches that show some issue with TeensyStep4, and I can...
Here is the table by @h4yn0nnym0u5e with the modified labels (rows in order of increasing speed).
Size [MB]
Speed [MHz]
Prefetch
Block Size [bytes]
memcpy
RAM to
PSRAM [MB/s]
memcpy
PSRAM
to RAM [MB/s]
DMA
RAM to PSRAM
[MB/s]
DMA
PSRAM...
Can one of you please clarify what speeds you are getting (MB/s) for PSRAM read and write with default clock per TD 1.60? Are these different for 16MB chips versus 8MB chips?
Just in case you ever want to try again, to get the makefile, you must (a) install the Arduino IDE and (b) install the Teensy board package. If you only do (a), you won't find it.
now() is in the Time library. It uses the same counter as millis(), and is not synchronized with the RTC. The library at the link below might be what you're looking for. It is based on the 600-MHz clock, and is synchronized with the RTC. The...
Forgive me if I'm stating the obvious, but have you checked your recycle bin? If you are using Windows Explorer to delete folders on C: after you move them to D:, you may have copies of those folders in the recycle bin (on C:).
The makefile is not part of the IDE, it’s part of the Teensy-specific board support, which apparently you had not installed. It helps if you read and follow the instructions. You’d be amazed at the things others have done with the tools that you...
Sounds good. I don't know if this custom board will ever have to do anything else in parallel with the data logging, but if it does, keep in mind that as your program is currently structured, the call to sd::write() will block during those long...
After hurling so many insults in so many different directions, you are lucky to get any response at all to your post. But, I'll take pity on your hubristic self & attempt to throw some crumbs your way. This may be regretted later, but I'm doing...
Of course! The interrupt delay gives me plenty of setup time. As it turns out, the way the FPGA code runs, your idea misses the first data value, but I just changed the clock sense in the FPGA so it goes high when the data is changed - so same...
I gather you wanted the sketch to read the data about halfway through the time it is valid, but if the FPGA sets the clock low after asserting the data, couldn't you just change your sketch to interrupt on the falling edge? There is a built-in...
I trust that you're right, but I have to admit that I know next to nothing about DMA on Teensy. This is such a simple application, it would be really helpful to work through it as an example for DMA usage. The OP's sketch simply reads a 32-bit...
I would tend to go the other way and keep everything in TCM if possible, since it seems to be more than enough. One little thing I noticed is that you are using priority 64 for the clock interrupt. Teensy's 1-kHz systick is 32, and while...
I haven't run your program yet, but I don't see anything wrong in the buffer logic. I don't understand what constitutes an "error" in your data, but one suggestion would be to define a uint32_t isr_count, increment on each interrupt and write...
Thanks for sharing the code and also the link to the thread on reducing interrupt overhead. The sketch embedded in that thread ran with no changes and I got the same values. If I understand the numbers correctly, the time from the triggering edge...