My knowledge may be outdated, but as far as I remember the Pico can do either audio-in or audio-out, but not both. You would also have to see if it can provide mclk for the SGTL.
In the meantime there is an...
This is the USB Serial. You may want to try Serial2 :-)
If that doesn't solve the problem, you'll have to show us some code - or better, all the code.
It needs to be broken down to a minimalistic example.
That's the easy part. attachInterrupt()
Then, you can take a look at the audio-library SPDIF input and look at the code. Remove all the DMA stuff, and it is almost done..
The Audio library provides raw data. Just use the AudioRecordQueue: https://www.pjrc.com/teensy/gui/?info=AudioRecordQueue to read the data - and then print it.
What is printing useful for?
IMXRT1060 Reference Manual Rev2, Page 2028 shows that it can gegerate an interrupt depending on the fill-state of the FIFO.
Of course there is no example code to do that, as the audio library is used, normally...
...
I would say the Pico would be more than busy with the sound emulation alone. The sound chip is very complex, and was the best of its time. The code for the sound emulation is quite complex, too....
I remember, when I...
See this Forum, "Announcements".
All your files will be deleted when you upload a new sketch.
As far as I know it is planned to change that. May take some months.
Teensy 4, see title.
Do we have a bug with printf? Perhaps include a wrong library?
T4 shouldn't need integer divisions in software...
The added code is a) slow and b) very large... and not enough, all that code is...
Teensy 4.1 builtin SD does not use pin 10. The Audio Board uses pin10 if you use its SD.
I think it should be natural to look at everything carefully before connecting anything, and I can't see an issue or would say...
The audio shields uses Pin 15 - it's for the optional potentiometer and has a capacitor to smooth its readings..
It's always a good idea to take a look at the used pins before connecting something :)
Hi,
I never tried that.
The code uses the SD from an interrupt, so I'd expect problems.
You can try to surround your code by AudioNoInterrupts() AudioInterrupts()n and make sure it computes in less time than an...
You can use the godbolt link I gave you, and modify the foo() function on the left to see the influence of different ways to write code. Even if you don't know assembler, you get an idea of what is happening if you look...
Whenever you call set_arm_clock.. Or try to copy the lines form set_arm_clock (regarding the IPG) to your program.
The other things..and "assembler".
Note, it is not really assembler.
a)
This thing:...
No I said the other chip just does not blink. The blink codes are not needed for boards sold by PJRC, because they are all tested.
The blink still indicates a problem that should be fixed, and you should send Paul...
https://github.com/PaulStoffregen/cores/blob/a2368ad57e9470608a234d942c55a2278c6cd72b/teensy4/clockspeed.c#L148
You could try to change the both "4" to 3 or even 2.. (600 / 3 = 200MHz or 600 / 2= 300MHz). But, as...
I tried it with godbolt: https://godbolt.org/z/dbbefx5K7
Looks like the compiler does translate the code above optimal (with -O2):
foo():
ldr r0, .L2
ldr r1, .L2+4
ldr r2, r0]
ldr...
You are using
AudioOutputPT8211_2 pt8211_2_1; //xy=557,951
Are you sure you are using the correct pins? Can you show your a photo of your hardware, please`?
And did you try one of the audio examples?
Most likely the problem are all the out of bound accesses to the array (Post #6) - there may be more than the String strings array.
ist has 5 elements. the first is - the last element is
You have several places...
AH...
Not sure if this is the case here... but it almost looks like!
Sounds it reasonable when I say the freeze is about 1.6 .. 1.7 seconds?
If yes, please try to update Teensyduino to 1.54 Beta 7, and after that,...
String strings;//
An array with 5 entries.
Pretty fascinating that this works on AVR..
for (int i = 0; i <=5 ; i++)
{
strings= myString.substring(0,myString.indexOf("|"));
all the code in this style
void thirteen()
{
digitalWrite(demux0,LOW);
digitalWrite(demux1,HIGH);
digitalWrite(demux2,HIGH);
digitalWrite(demux3,LOW);
digitalWrite(0,LOW);
digitalWrite(1,LOW);
...
Normally, a freeze is a hardfault.
Unfortunatley, Teensyduino jumps to a endless loop, then, instead of showing them ;)
I'd look for array / buffer overflows, nullpointers, etc.
Note, there is a newer revision (Rev.4 10/2019) of the Hardware Development Guide on the NXP website than the one mentioned here: https://www.pjrc.com/store/ic_mkl02_t4.html (which is Rev 0).
Needs registration and...
Perhaps we should review the PAD settings for I2C and use very conserative settings.
From my experients they work well, even for higher I2C speeds and may cause less problems.
edit: Perhaps the folks with your I2c...
As said, the unused-pins things does not help much and is the last useful thing. But you can view the waveform of I2c with the scope and perhaps use the PAD settings and add small caps until the edges are less sharp..
Take a look at the clock tree in the reference manual.
On Clock change, only PLL1 changes its frequency. Besides the ARM-Core-clock, IGP ist connected to this clock. Everything else is not influenced.
If re-init the...
Some general rules:
Don't use a low quality breadboard, no low quality china cables. If cables, they should be a short as possible (really).
Minimum - for audio - pins are 7, 8, 18, 19, 20, 21, 23, GND, 3V3 - and look...
The library says the circle is at x=4 mm (90° turned), the edge of the board at 11mm. 11-4 = 7mm
Normally, dimensions are in mm and this is the case here, too. Some crooked value makes no sense, so 7mm looks...
Depends of what other pins you use - it might have an effect to play with the PAD settings.
For example, I use something like this
// https://www.nxp.com/docs/en/application-note/AN5078.pdf
#define PADCONFIG ((0...
Yup, off topic. Sry.
A delay blocks if the other core if both need to communicate and the 2nd waits for the answer, which is normally the case.
Sure, you can write nice code to do that and somehow make it...
Think about that:
if (Sec <= 0) {
DisplayDays = Sec / 86400;
...
So, if Sec is negative, it calculates DisplayDays = -1 / 86400
I don't think you want that.
No it starts with 3, counts down to zero ,and _after_that_ it prints your 6:28. That's correct.
What do you expect to happen when the time is over?
Currently, its an underflow.
Do you want the program to stop?
Or,...
Are there enough remaining resources to emulate I2S via flexIO? If my questions makes sense.. not sure as there would be no board for cam&audio.. and if there would be one, it had the cam on other pins?
Last version of MPU settings (Pullrequest is still open)
https://github.com/FrankBoesing/cores/blob/d163c5fcfb5243e81a5a683b88e0ac9c8482eabc/teensy4/startup.c#L222
Now all regions are minimum, which is the...
These things are easier and work better with an rtos.
Without you have many busy waits, as we have now. Worst case ever would be the fast core waiting for the slow core because it does blocking spi or such things......
I don't care much. For beginners kB might be easier to read and does not show a (pseudo-)precision that is not there.
So, SF decided to make either camera OR audio possible? Hm?
I doubt it has debugging - if it has, I'd be interested, too :)
Size: perhaps you should fix the itcm size too - it shows the blocks only -not possible to see the size in bytes. Currently the number is misleading...
Buttons and interrupts are not friends. The button bouncing makes things more complicated than necessary. It is existent on both CPUs - on every cpu - because it is the button that bounces.
So the solution is: Don't...
The simplest is a USB cable from which you carefully remove the insulation, cut the 5 volts and insert an opening switch. If you put a 2-pin jumper in there, you can use that at the same time to measure the required...
The factor of 60 Hz and 120Hz is two. Still more than 8 millisconds - and that just the Screen.. No eyes, no brain, no muscles, no nerves included, that time is a multiple of that.
But OK, if you think it helps, it...
Your "delay" is not working.
for (int i = 0; i < 1000; i++) dummy ++; // just to create a delay
The compiler optimizes this completely away, as it does nothing.
Re: The arcticle in the german magazine "Funkamateur"
The schematic: The mic ICS-40730 signal goes to the two op-amps of a LM4562, and from there directly to pin A0 which is used as A/D.
Output, as mentioned, is...
I'll post some details about the article after takining a nap.. i'm pretty tired and it is friday...
Short: Sound output is via PWM. Input with a ICS40730 microphone, which is, according to the article, difficult to...