Maybe still possible with some digital I/O and "write enable/disable" circuitry, but not sounding very practical. Still interesting to learn of these additional capabilities of LPSPI.
Section 7.4.1.3 describes an auto-sequence mode, with auto-repeat, where the device cycles through the chosen channels on each CS. Could the T4.x SOUT be connected to allow write to the device's SDI for writing...
I could be wrong, but my reading of the LPSPI chapter of the RM is that 2-bit parallel half-duplex transfers can be done with available pins, as they require only SOUT and SIN.
- PCS0 and PCS1 are always chip selects...
I will be curious to hear from Paul and others, but my understanding is the T4.x processors have SPI and FlexSPI, which is Quad SPI. They do not have a Dual SPI peripheral. The Quad SPI is described as being for...
The T4.1 microcontroller chip has no internal flash, so the code is stored on an external serial flash chip on the T4.1 board. As @jmarsh said, if the Teensy was not "locked", then it's theoretically possible to remove...
Do you mean the code compiled and ran on some target other than Teensy? Or the code compiled successfully on some host, and you no longer have access to that host?
See the TeensySdioLogger example in the SdFat library. It shows how to do what you're trying to do. It's not obvious, but while calls to SD write functions will often execute quickly, they will occasionally take a long...
Oh, you're right. I didn't even read the code. As soon as I saw "NativeEthernet", I thought he should switch to QNEthernet. I'm pretty sure that Shawn just recently mentioned that QNEthernet is designed to run in one...
No worries, Mark. I'm glad that FlasherX is helping you. I couldn't do my projects without it. I get what you're saying about being able to do what is necessary with scripts, etc. It's interesting to me that there is no...
Hi Mark. I included read_ascii_line() in FXUtil.cpp because I thought it was "generic" enough that it would be useful to anyone transferring via UART. I think in your case, the gaps appear because of what is happening...
Hi Mark. Am I correct that you have this: host <----wifi----> T4(1) <----UART----> T4(2) ?
Are you sending the actual hex file produced by the IDE from the host to T4(1)? How are you sending it? I don't...
Well, that's suspicious, and makes it sound more likely a software issue, but it's hard to guess what might be wrong if you can't share any details. It might be useful to create a test program that does nothing but...
Hi Mark. In my original testing, both in and out were USB Serial. I don't think the print/flush is needed if your output stream goes to a UART, but it's probably worth testing.
Perhaps there should be. Searching on google and this forum seems to indicate the best practice is to flush and close all files, and then it is okay to remove the card. When you remove/insert a card, it will be reset.
...
What's wrong with having multiple instancses of SPISettings? I believe that is the intended purpose of SPI::begin/endTransaction().
SPISettings SPIsettings1( 16000000, LSBFIRST, SPI_MODE3 );
SPISettings...
The compiler (gcc) and other tools are part of the board package (TeensyDuino), as opposed to being part of Arduino (1.8.19 or 2.10), so you can use older/newer tools with either IDE. The gcc version in TeensyDuino 1.58...
Just tried the CardInfo example with changing only one line (below) and it worked for me. 32 GB Sandisk Ultra. Arduino 1.8.19. TeensyDuino 1.58. Windows 7 Pro.
const int chipSelect = BUILTIN_SDCARD;
I don't know a whole lot about LittleFS, but it seems to be intended for flash or RAM, as opposed to SD card. The comments in the source code say it is "linked" to SdFat, but I think that means you can use some of the...
You're welcome, and yes, the idea of FlasherX is to build it into your own application, so that as you release new versions, each one can be updated via FlasherX to the new version.
The hex file on the SD card must contain the string "fw_teensy40", or a similar string that defines whatever type of teensy you are trying to program. This is meant to prevent loading a T3.6 program on a T3.2, etc.
...
You're welcome. That may be because the SPI library does not support the use of the chip selects that are integrated with the SPI peripheral. One of these days I'm going to make a simple SPI driver that uses the...
The line of code below from SPI.h sets the value for the CCR (clock configuration register) of the LPSPI, and determines the lengths of those delays. You can experiment with shorter delays by hard-coding different...
This ADC uses an interface I haven't heard of before, called serial LVDS (low-voltage differential signal). Each output is actually a differential pair, so I think you would need an LVDS receiver to translate this to...
Probably because there are a set of divisors that define the possible values, as opposed to being able to set any desired frequency. Best to review the code to understand the limits.
Yes, you may have gotten lucky in the sense that your array was able to grow large enough to hold your original test program. Are you reading the ASCII hex data into your array? Do you know how big the file is and...
Are you using Teensy 3.5? You have not shown how you are trying to use the SD card, so it's hard to say what is wrong.
For all Teensy with built-in SD card (T3.5, T3.6, T4.1), the value of BUILTIN_SDCARD is 254, and...
The links below are for a forum thread and github repository for eFlexPwm library by user @epsilonrt. With this library you can produce center-aligned, complementary PWM, with programmable deadtime. I have used it at 10...
I haven't tried to understand your program in detail, but I'll comment on your question. In general, no, you can't call a function that is stored on your SD card. You could conceivably store a form of "executable code"...
I think it's a good idea to give it a prefix that identifies it as yours, rather than use such a generic name. Perhaps use your initials, such REBCircularBuffer?
There are quite a few existing libraries named CircularBuffer, so it might be a good idea to give it another name. I have used the one below, which is a template library where both the data type (and size) and number of...
Yikes, well, one person's common is the next person's niche. I see a good number of posts about low-power applicatipons, but far more that are not, including lots of motor control, audio, etc. Perhaps there could be a...
The highest rate I saw for an ADXL device was 25 kHz, but I saw many articles on "high frequency" and "high bandwidth" MEMS accelerometers, so there may be faster ones out there, though they may be very specialized. I...
If you want higher-frequency data, you need a different sensor. The link below is an article from Analog Devices on choosing a MEMS vibration sensor. There is a chart that shows their highest-bandwidth sensors are in...
I took your code and made 3 quick changes
- add Serial.begin() to setup() so the program not only blinks the LED but also writes to SerMon
- uncomment testReceive(), so the program does both send and receive
-...
I think the problem may be that you are using print() to send from Teensy and read() to receive on ESP32. When you use Serial2.print(0) (or 1), what gets written to the UART is the ASCII representation of the number 0,...
I'm not sure about those "other contexts", but first guess would be the LED is not on the correct pin or some other hardware issue. Can you show the schematic?
For 2.x it would be something like this, with your own "user" name and whatever TD version your are using..
C:\Users\user\AppData\Local\Arduino15\packages\teensy\tools\teensy-tools\0.58.3
Each Arduino library has a library.properties file with a field labeled "architectures". It's good to look through available libraries and see which ones seem to be actively updated/supported.
This is a...
The library you chose is written for AVR, so it needs to be modified for use with Teensy. If you use the 3 functions below to replace the originals in MX1508.cpp, I think it will work. One more thing I saw that caused...
This is very nice. Thanks for posting. Just one minor thing, in your ISR you don't need the logic related to testing for rollover, and your correction of 0xFFFF results in an error of 1 on rollover. The unsigned result...
Don't know if it matters, but I do see one difference between your two ISRs that looks suspicious. Is it correct?
In DROARiseIsr() you have
lastDROEvent = LINE_Aa;
lastDROEventAa = 'A';
but in...
I don't know what you mean by signal patterns, other than the phase relationship between A and B, but if you can't use the quadrature hardware, I wonder if you have thought of using level-triggered interrupts rather...
Yes, I need to do some updates. Will do as soon as I get a few other things off my plate. Glad you got it working. Just FYI, I have a large C code base, and I'm gradually migrating everything to C++.
The T3.6 (and other Teensy boards) have the capability to do quadrature (AB and ABZ) counting in hardware, so you could entirely avoid the dual inputs and interrupt-based counting. With that said, the things that I...
It’s hard to say what could be wrong, knowing so little about your program. If you think loop is executing too often, then yes, add delay(1) to your loop()
In the Arduino 1.8.xx IDE, if you click on the menu item File::Preferences. In the lower left of the preferences dialog you'll see a link to the location of your "preferences.txt" file. By default, your hex and lst and...
I can second much of AndyA's recommendations here, but also express support for UDP if you need it. In my own applications, I update firmware via hard UART connections, which I think of as equivalent to UDP (send and...
Just a quick reply. If you want precise 100 kHz sampling, you may want to use an interval timer and do the sampling in the ISR. I don't know the internals of TeensyThreads, but relying on the sum of time slices to...
I haven't heard any discussion of replacements for LC and 3.x. Perhaps the supply of the older chips will eventually recover to some degree. Availability of all Cortex M0/M3/M4 seems to be limited, i.e. not just NXP...
Your macro is checking T3.x registers, so it is specific to T3.x. On T4.x, EEPROM is emulated in FLASH, and if you use the EEPROM library, your code will work on both 3.x and 4.x. The EEPROM library equivalents to your...
Short answer is yes. I was also very confused at first by the term OTA (over the air) for what was actually OTW (over the wire). What you outline above is exactly what @shuptuu and @AndyA are doing, with the exception...
You're welcome, yes, the power of the Arduino platform is the "layers" of software and the capabilities they provide. In the diagram below, the sketch and the Dps368 library are non-platform-specific, meaning the same...
I'm not sure I am answering your question, but it's important to understand that the ONLY way to connect to the Teensy bootloader is through a hard connection to the Teensy USB port. OTA updates using FlasherX can be...
The "ambiguous" errors occur because calls to requestFrom() in the library contain multiple possible matches to different (overloaded) versions of that function in the Teensy Wire library. There is a version where all 3...
T4.x has a base UART_CLOCK of 24 MHz. The begin() function has an algorithm to set two different divisors to get as close as possible to the desired baud rate, and the result in your case is 76923 baud. The error is...
@epsilonrt, I got your latest version 1.2.5 today, and finally got around to running your test programs and looking at signals. Everything worked as you described (very good comments). I need to do some reading to...