Not sure if the RAWHID_* and DEVICE_ * are needed and what they are doing
they com from USB_EVERYTHING
they are used in part for
USB_SERIAL_HID (DEVICE_*)
USB_RAW_HID (RAWHID_*)
but
USB_MIDI4,16...
One issue with MTP+Serial is that it uses for the moment the PID of Everything
Even if MTP+Serual is not yet ready to be included for full, I continue to suggest that Paul defines a dedicated PID, so we can run the...
About 3 years ago, I made a FAT free FS called ZeroFS
https://github.com/WMXZ-EU/zeroFS
Not that I suggest you to use this, but it may be easier to digest what I did than analysing FatFs
In general
you only have to...
From T4.1 card, I see
SCK,MOSI,MISO
SCK1,MOSI1,MISO1
SCK2,MOSI2,MISO2
You should be able to use any set for talking to uSD cards
HOWEVER, you must then adapt the SD card interface accordingly.
There may be also...
For SPI,
you always should check that CLK,MOSI,MISO and chip select of your board correspond to your program. The Teensy card may help to figure out the standard values.
Thanks Bill,
I tried with new disk and it worked also here.
sane configuration (SdFat 2.1.2, Teensyduino 1.56 with Arduino 1.8.19)
must have screwed up my earlier testing.
Just downloaded actual version and without further editing of SdConfig.h and activating build-in debug messages, I get
test exFAT logger
sd.begin() done
file FILE_A.txt, pos=8192, adding 8192 bytes, written 8192...
@sicco
You can easily switch on the internal debug information of SdFat by uncommenting
setting
#define USE_DBG_MACROS 2
in
...\hardware\teensy\avr\libraries\SdFat\src\common\DebugMacros.h
It gives you a...
I remover the two files and restarted program
test exFAT logger
sd.begin() done
file FILE_A.txt, pos=8192, adding 8192 bytes, written 8192
file FILE_B.txt, pos=8192, adding 8192 bytes, written 8192
file FILE_A.txt,...
I tried the example
it fails here with
FFFFFFFF EB3A9
DBG_FAIL: ExFatPartition.cpp.195
DBG_FAIL: ExFatFileWrite.cpp.108
DBG_FAIL: ExFatFileWrite.cpp.663
file FILE_A.txt, pos=65536, adding 8192 bytes, written 0
...
I could not resist to adapt to Teensy 4.0 with AudioCard
/**
* @brief Circular Buffer definitions
*
*/
#define NBUF_ACQ 70
#if defined(ARDUINO_TEENSY41)
#define MAXBUF (10*512)
...
Here is the version that writes directly to csv files
/**
* @brief Circular Buffer definitions
*
*/
#define NBUF_ACQ 70
#define MAXBUF (10*512)
EXTMEM char data_buffer;
this way you may need a more complex program:
- acquire data and control vehicle.
- convert data.
of course, you can download two different programs, 1 for acquisition and one for converting.
but then you could run...
Yes that is the idea, you want size to be a multiple of 10 and a multiple of 512 (128 *4)
If you have the possibility, I would take the disk out from teensy ad plug into PC.
Alternatively you could use MTP to...
As a proof of concept I compiled the following
/**
* @brief Circular Buffer definitions
*
*/
#define NBUF_ACQ 10
#define MAXBUF 1280
EXTMEM uint32_t data_buffer;
IMO, you should redesign your approach to use interrupts even if that happens 2000 times per second. this way you can do your 150 us processing at interrupt level, accumulate your data at a write queue and safely...
On a T4.1 with 16MB ERAM buffer and 33 MHz SPI clock, you can easily record 2.75 MB/s continuously to microSD (about 75% SPI duty circle)
From time to time some buffer will be needed and used when microSD card is...
I have not tried it recently, but if you set the baud rate of the comport of the teensy in question to 134 baud, then Teensy should go into program mode.
Idea is that loader detects first teensy in program mode to...
from figure 2 of https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf
you see that line-in goes to a 0 to 22.5 dB amplifier
so I would say, if you select SG = 0 for the sgtl5000 then you attenuate your line-in by...
I only refer to the schematics SNAP(2) is using.
Depending on your application a SGTL5000 my not be suitable without additional amplification. Additional 20 dB may be useful for very quiet scenarios.
I suggest to...
The SNAP2 connects hydrophone to line-in of SGTL-5000
BTW,
if you wanted to build your own SNAP2 compatible recorder, simply use a Teensy with Audioboard, you only miss the display
Edit:
Hint: In order to see...
@vindar
There is nothing magic about Linear Algebra, so I would not expect that CMSIS library is significant faster than own code. In most cases compiler is smart enough.
If you have not done yet, have a look into the...
@DM5SG
not sure, it is a good idea to have destination buffer smaller than source buffer.
It is not obvious from example code that transfer count is being determinate by last buffer call (here ...