What I not understand is the following:
I tell SNVS to wake-up the processor, say in 1 minute.
I expect that alarm ISR is called after 1 minute, but MCU is not running, therefore alarm ISR can not run.
Also, power...
Anyhow,
here is a stripped down version
#include "core_pins.h"
#include "TimeLib.h"
/******************* Seting Alarm ***************/
#define SNVS_LPCR_LPTA_EN_MASK (0x2U)
void rtc_stopAlarm()
{
Sorry, that is my fault.
I'm using the latest (beta) version of SdFat.
You could change code to become
#if SDFAT_BETA == 0
SdFatSdio sd;
File file;
#else
SdFs sd;
FsFile file;
@defragster,
Sure you can minimize code.
The original version was done during T4-beta. There was work by someone else before, but I only used T4 RefMan.
what is your expected data rate?
The following code may be a start
//
#define SDFAT_BETA 0
#if SDFAT_BETA == 0
#include <SdFat.h>
#else
#include <SdFat-beta.h> // latest SdFat needed for SDIO and (renamed...
So, if the ADC gives SNR of 96 dB, it is integrated over the whole bandwidth (A-weighted) and 15, 16th bit are very likely noisy.
BUT if you go into spectral analysis (say >1024 point FFT) then you can detect features...
next thing I would try is to move the print to serial adjacent to prints to file move from loop into doLogging
for(int ii=0; ii<nb; ii++)
{ file.print(',');
file.print(data1);
file.print(',');
...
It is not a question of Teensy, but the library you are using
Suggest to use Bill-Greimans SdFat-beta https://github.com/greiman/SdFat-beta which supports all Teensies and also exFAT
For normal audio recording the...
I would first apply the following change
//open file
sprintf(filename,"Data%03d.csv",ifl); ifl++;
than can you tell us what the serial monitor is printing
Not sure anymore.
Put T4 on powered USB hub, and new confusing issue.
Also used progmem to keep rtc_reset, rtc_stopAlarm, rtc_isr, so their code does not disappear when shutting down (I hope)
after shutdown,...
inserting as first call into setup()
void rtc_resetAlarm()
{
SNVS_LPCR &= ~SNVS_LPCR_LPTA_EN_MASK;
while (SNVS_LPCR & SNVS_LPCR_LPTA_EN_MASK);
}
and called as
Not sure (I did not had time to assemble the latest Breakout board). I will check this evening.
I did my tests with a recent T4 purchase (from PJRC).
For my latest test, I physically connected ON/OFF to GND and let...
So, I changed running phase to 20 blinks, and after start I connected permanently on/off to GND
after first 5 seconds program power cycled, but then grounded power on/off had NO effect anymore (program blinks for 20...
This is what one would could easily implement also in an embedded system, bring out both lines (program and power on/off lines)
Now, I found another "feature":
RTC coin cell connected, program is running: pressing...
here is a test Code
#include "core_pins.h"
#include "TimeLib.h"
/******************* Seting Alarm ***************/
#define SNVS_LPSR_PGD_MASK (0x8U)
#define SNVS_LPCR_LPTA_EN_MASK (0x2U)
...
yes, on/off (reset) line works (nearly) as expected
T4 running: long (>5s) on/off line to GND switches T4 off , BUT T4 comes on again immediately (I was still grounding on-off line)
T4 off: short on/off line to GND...
I have the following scenario
T4 with coin cell for RTC connected to PC-USB. (T4 is soldered to revD audioboard, no external power)
SW shuts down Teensy (turns off power). (SNVS_LPCR |=(1<<6) ; ) (T4 will be...
Let us be realistic.
T3.6 had all pins available for SWD, and it needed only a "simple" modification in the bootloader chip to allow easy use of SWD. (lets ignore the HW solution discussed in the forum)
I say...
AFAIK, there should be NO DMA that directly accesses audio-block data. If there are few objects that do that, maybe they should be rewritten. Could you give some examples, where audioblocks are used as DMA addresses?
to change AUDIO_BLOCK_SAMPLES you have to change it in the cores/Teensy3/AudioStreams.h file and recompile the whole system (changing some entry in Tools of Arduino IDE)
Chip,
The original version of he MTP has serial and not seremu
https://github.com/yoonghm/MTP/blob/master/usb_desc.h
Not clear why Paul has chosen to use seremu.
Also not clear (forgot) if and what we have changed...
On T4, I would suggest to add a 3V coin cell and not to rely on Vin for keeping RTC.
E.g. T4 can switch off internal 3.3V and then you lost RTC.
Coin cell will last sufficiently long to avoid problems.
There are multiple threads that use Teensy4 as is and make the carrier PCB with castellated connection to teensy. Through-holes are also easy connected.
I plan t do similar for my boards.
Note, you cannot mount T4...
Thanks for doing it.
especially of interest to me, what is the procedure for continues DMA (say in case of I2S input DMA)? Does ISR needs to address caching (as done in Output_I2S) or not (as done in Input_I2S)?
Correction: Jetson Nano is a 4core ARM and 128GPU system.
but you are right, AI is (again) very trendy.
I would like to see some effort to use the GPU on the T4 for processing, if it can be accessed.
@jpaudio
I updated /modified the https://github.com/WMXZ-EU/microSoundRecorder/tree/microSoundRecorder_dev branch of the microSoundRecorder to use and initialize CS42448
(no playback yet)
I compiled it with Arduino...
As you are concerned with time-wasting and have all equipment for production in house, maybe you could consider designing your own Teensy PCB (getting the bootloader chip from PJRC).
Schematics and reference board are...
It cannot be easier than with Teensy.exe. only two buttons to click, and one file to select.
(are you really saying, that you let someone update a MCU with a new firmware, who is not capable of selecting a file using...
@jpaudio,
As I do not have a CS42448 Audio board, I will try to look into the code only, and you have to do the testing for me.
From your description, it means that there is some initialization missing.
The other...
Only partially correct. when using MTP you get Seremu which simulates Serial over HID. Using Arduino, you have same functionality as with Serial. On Linux, you simply can cat end echo to the HID port. Not sure about...
My interest is only to learn how I could use all the memory available. If I have to DMA or dynamic allocation or something else.
The new picture seems to be what I was expecting.
Yes, you can do so.
Only drawback is that AudioBoard SD card is SPI based and 1mm pich based sdCard (as on T4 and T3.6) is SDIO based.
AS SPI has only a 1 bit dataport and SDIO has 4 bit dataport SDIO based cards can...
As you asked for special feature, you may have to write it yourself
I assume you wanted code for T3.x and not T4
So, I checked kinetis.h, the k66 manual and some other core samples and
SIM_SOPT2 |= ...
Let me try
Assume you are in a cathedral, and you transmit a loud but very short impulse (ideally 1 sample), then what you hear is a lot of reverberation, that is a lot of echoes that come back from different walls and...
To add to Paul's comment:
I have a version where ADC is running as master and Teensy as slave, BUT Teensy provides the MCLK for the ADC (i.e. not using a Xtal).
So Teensy outputs MCLK but as slave syncs to external...
Michael,
Assume you wanted same sampling frequency (LRCLK and BCLK)
you connect LRCLK and BCLK to both devices, you connect MCLK to devices that need MCLK (assuming both devices use the same MCLK/LRCLK ratio)
The I2S...
doubling the set_arm_clock command seems to work
#if defined(__IMXRT1062__)
extern "C" uint32_t set_arm_clock(uint32_t frequency);
#endif
void setup() {
// put your setup code here, to run once:
#if...
It may have compiled to Arduino and not Teensy libraries, that are in a different folder and take precedence in compiling and linking.
In the post I referred to, you were saying you installed ONLY Audio library when yo...
Strange that this compiled correctly. The audio library needs other libraries (e.g. Wire to talk to the SGTL5000). Try to install with ALL TD libraries.
I get wrong values using micros() after changing CPU speed with set_arm_clock on a T4.
#if defined(__IMXRT1062__)
extern "C" uint32_t set_arm_clock(uint32_t frequency);
#endif
void setup() {
// put your setup...
what happens if you use "AudioNoInterrupts" ONLY in the beginning and AudioInterrupts at the end of frequencyUpdate ?
IMO that is the only place where it matters (you stop and restart audio processing only while you...
maybe I missed it.
I can program the RTC alarm and shutdown the RTC, but I miss the link that tells the imxrt1062 to reboot on RTC alarm.
So any advice that is more specific than decoding the reference manual?
I see what you aiming for, reactance per se does not increase noise (it is imaginary and not real), but changes gain, so impact of real noise sources have a higher impact.
Will have to play with that and see if that is...
@jpaudio
I'm on travel right now, but can look into the problem beginning next Tuesday.
mean while could you please be a little bit more specific?
maybe you could post the config.h file and give any indication of...