M
Reaction score
20

Latest activity Postings About

    • M
      LOL! I worked on a military guidance and control application some years ago where our results with UBlox systems were very good at our test site in Arizona. I kept telling the management to adjust their expectations if the system was used...
    • M
      This code from the referenced thread should prove that the T4.1 can collect at 1Million samples per second: /******************************************************* 1.0 MegaSample T4.1 ADC using ADC timer to trigger the ADC collection...
    • M
      I did a bit of research on hubs. It seems that USB 3.0 hubs maintain two separate data paths: one for USB 2.0 with 480Mb/Sec capability and one with USB 3.0 5Gb/Sec capability. I verified that a USB 2.0 hub gives the same improvement in...
    • M
      I made an interesting discovery this morning: If I put a powered USB 3.0 hub between the Lepton T3.2 and the Host Serial port of the T4.1, the data upload speed increases dramatically! Without the hub, the upload of a 38400-byte frame takes...
    • M
      I'm having other issues with the HostSerial receive that are puzzling. The T3.2 device sends good frames to my PC, but when I try to read with HostSerial, I get lots of garbage data or no data at all in the destination buffer. I think I may...
    • M
      I tried using the BigBuffer version. It didn't help. After a bit more research, I've come to two conclusions: 1. The availability of just two buffers for transactions may be a limiting factor. Making the buffers larger with BigBuffer...
    • M
      You might try your tests using just "USBSerial serial(myusb);". I suspect that the FTDI is only a Full-Speed link, not the 480Mb/second High-Speed for which USBSerial_BigBuffer was designed. Just today, I found that BigBuffer will crash the...
    • M
      I am working on a driver for the FLIR Lepton camera. As part of the testing, I send frames of 38400 bytes to a PC host for display. The driver is running on a custom T3.2 connected to the Lepton. It receives Lepton data over SPI using DMA...
    • M
      mborgerson replied to the thread T4 Pixel Pipeline Library.
      The PXP can be very useful for some applications. A little over 3 years ago, I used it to manipulate images for a slide show app. The PXP made possible things like fade-in, fade-out, moving transitions, and Ken Burns effect (combination of...
    • M
      Unless you have a WFI (Wait For Interrupt) instruction somewhere in your code, adding or removing interrupts shouldn't change power dissipation significantly. Adding more peripheral devices to your program can increase power dissipation if...
    • M
      I'm not sure you need to add the complexity of DMA to do this. If 25000 samples (what you get at 250K sampling for 1/10th second), you only need 50KBytes for the ADC samples. You could put those in DMAMEM, standard ITCM or in EXTMEM, if you...
    • M
      After many months in T4.X land, I'm now embarked on a Teensy 3.2 project. I have to keep reminding myself that the T3.2 DOES NOT have a hardware floating point unit---much less one that does double-precision calculations with a 600MHz system...
    • M
      The SD Controller does not necessarily use DMA. It can use either DMA or code which directly copies bytes: // From the SDIOteensy.cpp source code: bool SdioCard::writeData(const uint8_t* src) { DBG_IRQSTAT(); if (!waitTransferComplete())...
    • M
      If the EXTMEM driver can handle 30MB/sec long term, that would explain why the EXTMEM handles the 18MB/sec 99.99% of the time, but sometimes gets address bits mixed up during the circular buffer wraparound. One problem I face is that, once the...
    • M
      In my current WIP project, implementing USB Test and Measurement Class (USBTMC) drivers for Teensy 4.1 hosts and devices, I have encountered an issue that may concern other developers who depend on EXTMEM for large buffers. In my case, I use 4MB...
    • M
      A 64-byte buffer was probably a good choice in the days before the T4.x. For T4 systems, perhaps 512 bytes would be a better choice. Any T4 program that can't spare a few KB for buffers is probably so large or uses so much memory for data that...
    • M
      I should add that I quit using binary uploads a year or two ago when the MTP library matured and was much better integrated into TeensyDuino. A key feature is the MTPReset function, which updates the Teensy internal MTP directory so that your PC...
    • M
      I did two things differently when I was uploading files to a Python script a few years ago. 1. I set up the T4.1 to use Dual Serial USB then used Serial1 exclusively for the binary transfers. 2. I used a much larger buffer, 51200 bytes (100...
    • M
      You can increase like this: sample timer.priority(64); // increase priority of sample timer interval timer Lower priority numbers actually mean higher priority. Think of it this way: higher numbers have to wait longer than lower numbers...
    • M
      mborgerson replied to the thread Teensy 4.1 serial USB crash.
      You may think your PC program is only sending one frame every 50mSec, but are they actually arriving at the Teensy 50mSec apart? A 42-KB frame can be sent to the T4.1 in about 3milliSeconds if the PC really wants to pack the bytes into...
    • M
      mborgerson replied to the thread Teensy 4.1 serial USB crash.
      OK,, since the OP specified 300 LEDs, it seems that each update is going to take about 9 milliseconds. Since the show() function starts with while (update_in_progress) ; If you have multiple frames of data, after the first call, each...
    • M
      mborgerson replied to the thread Teensy 4.1 serial USB crash.
      I'm not familiar with the Octo-Leds, but I have done a lot of high-speed comms between PC and Teensy. In one of your earlier posts you noted that the problems disappeared if you commented out leds.show(). For me, that immediately raised the...
    • M
      After thinking about your goal--collecting RMS voltage data, I decided to try a software aproach that relies on a single ADC channels collecting data at 50KSamples/second. Other than the ADC channel (using timer-controlled ADC collection), and...
    • M
      mborgerson replied to the thread Suggested ADC component.
      The code at that link isn't quite a Teensy-compatible library. It does show how to use the hardware to collect analog data. With a wrapper to handle the Teensy SPI transactions, it might save a lot of work. A complete library should have...
    • M
      mborgerson replied to the thread Suggested ADC component.
      I have used the Linear Technology LTC1867L in several projects over the last decade. ltc1863l-1867l.pdf This chip has been around since about 2005, but is still in stock at Digi-Key for about $20 at quantity 25. The LTC1867 runs off 5V, but...
    • M
      I did some simple LTSpice modeling, and it looks like a simple capacitor and resistor divide may be adequate. For the 20 micro-farad capacitor could parallel a couple of 10uF ceramic caps. The output graph is hard to read, as the lines turned...
      • Simple Offset copy.png
      • Simple offset frequency response.png
    • M
      I've take a break from another project to look at your problem. There are several significant issues that need to be cleared up before I can come up with an algorithm: 1. What is the level of the signal output? I assume that, since it is an...
    • M
      Here's an update on the USBTMC project: After a few weeks lost to vacation time in a place sunnier than Western Oregon, I've gotten back to the USBTMC project. Progress has been better than I expected: 1. I have connected three Teensy USBTMC...
    • M
      If you want to sample the same signal with two different ADC channels, or even connect one signal to both an ADC input and a comparator input, you may need a couple of amplifiers to divide the signal into two (or more) parts, each having a low...
    • M
      My USBTMC (USB Test and Measurement Class) code has progressed to the point where I'm optimizing the data transfer functions that move data packets from the connected devices to the host. The USBTMC specification mandates request/response model...
    • M
      Sorry about that. I'm in the middle of a cold caught on return from a family vacation trip. This link may be more useful Fast ADC sampling I'll look at your other questions the first morning after I get more than four hours of sleep!
    • M
      At the top of the Boards.txt file is a reference to a workaround to make Arduino recognize changes to boards.txt. Boards.txt workaround the suggestion there is to delete the file "User Data" That file no longer exists in IDE 2.3.1. The...
    • M
      Not entirely true. If you use the ADC timer functions in the ADC library, ADC Collection is started by the hardware. The response to the interrupt and the processing and storage of the results may be delayed a bit by other interrupts, but...
    • M
      This project is definitely going to be published---it's free of the NDAs that hinder the distribution of the FLIR Boson source code. It's a Work-In-Progress that will probably occupy a good part of my non-travel time over the next several...
    • M
      In a now-closed thread, @PaulStoffregen said: In the process of developing my USBTMC (USB Test and Measurement Class) driver, I have found it necessary to also modify usb_desc.c to insert the descriptor data from usb_desc.h into the executed...
    • M
      There are some issues you need to consider: 1. How noisy is your input signal? This will determine how much hysteresis you will need in determining the zero crossing. 2. How often do you need to collect this data? 3. Will the results be...
    • M
      Update: It seems you can make cosmetic changes to the USB type menu, and long as you don't change the number of items or their order. In boards.txt: teensy41.menu.usb.serial=Serial teensy41.menu.usb.serial.build.usbtype=USB_SERIAL...
    • M
      At the top of boards.txt for TD 1.59 there is this: # Solution for Arduino IDE 2.0 recognizing changes to this file: # https://github.com/arduino/arduino-ide/issues/1030#issuecomment-1152005617 The solution at GitHub from @per1234 is: I'll...
    • M
      mborgerson replied to the thread FFT not working properly.
      I shouldn't do these things late at night! There's a bug in the code to extract the fft samples from the buffer. It should be: vReal[ j ] = adc_volt[start+j ]; vImage[ j ] = 0; // still not sure if this needs to be done more than once!
    • M
      mborgerson replied to the thread FFT not working properly.
      It looks like you are calling your fft() function 30,000 times, but you only use the values from 0 to SAMPLES each time! You don't seem to ever do the FFT over the rest of the sample. 1. Subtract the mean as you are doing in your loop. DO...
    • M
      mborgerson replied to the thread Teensy AD sampling.
      I did the correlation experiments about 3-4 years ago. I've attached a zip file with several sample sketches. Most were done with a T3.6, so that I could use the onboard DAC for signal output. I think you could probably get by with a 3-bit...
    • M
      mborgerson replied to the thread Magic numbers in usb_desc.c.
      Thanks for the link to USB in a Nutshell. I'll look it over. I didn't add anything to the descriptor list and the USBTMC device seems to enumerate properly. The USBTMC device, as I have it now, has the standard USB Serial interface and...
    • M
      I am modifying the usb descriptors defined in usb_desc.c to add the USB Test and Measurement class device. I think I have most of it correct, as my device seems to enumerate properly. At the end of the file there is code to build a descriptor...
    • M
      mborgerson replied to the thread Teensy AD sampling.
      I'm not sure that the Audio library will work well with a 70KHz signal. I think the Audio signal chain is designed around 44.1KHz sampling of signals up to about 20KHz. For a 70KHz signal you will need input amplifiers with greater bandwidth and...
    • M
      I've made enough progress in my USB Test and Measurement Class (USBTMC) host and device drivers to start the initial hardware testing with one T4.1 host connected to one T4.1 device. My initial tests will skip the implementation of the USBTMC...
    • M
      You could also add a LED blink during the expected playback time. #include <Audio.h> //#include <Wire.h> //#include <SPI.h> #include <SerialFlash.h> // GUItool: begin automatically generated code AudioPlaySdWav playSdWav1...
    • M
      I checked the IMX-RT1062 reference manual. It tells me that the MQS outputs are PWM outputs suitable for directly driving a speaker or headphones. The next steps in troubleshooting would be: 1. If you don't have the T4.1 audio shield, get...
  • Loading…
  • Loading…
Back
Top