Sadly, that's nothing you could fix.
I'm looking for the popcorn right now....
Type: Posts; User: Frank B
Sadly, that's nothing you could fix.
I'm looking for the popcorn right now....
Yup, that's how a forum works :)
Good enough. That's how Arduino works, yes. Perfectly compatible.
To be really useful it has to be called by external, third-party libraries, too. Otherwise it may happen that it does not get called for several seconds.
Make sure there is a way to disable it in...
As long you don't add a simple, empty serialEvent() or a "real event"
However, a "loops/second" is so far away from something I'd call a benchmark... not worth to spend even a second on it.
...
Awsome :)
Recording: Yes, you can enable recording (there is #if 0 in both, the .h and the .cpp file)
But recording has even tighter requirements on timing and it's not testedt. It likely that it...
Okay, as usual no answer from Paul, and i guess Kurt (who did that) does not see the problem :)
The issue is, currently the yield_active_check_flags is used as something like "enabled".
That's not...
Also look for uintptr_t
Its wrong, don't do that. (See the other answers, too)
Suche "yield();" (20 Treffer in 15 Dateien von 155 gesucht)
C:\Arduino\hardware\teensy\avr\cores\teensy4\delay.c (1 Treffer)
Zeile 62: yield();
...
I wouldn't call that detail. Is affects 100% (ALL) programs and makes them unnecessary slower, and is helpful for maybe 1 of 10000 (nobody uses it)
As said above, overriding yield() is not enough...
Yes. and?
If it's abufferoverflow for example, an array ot of range or whatever the memory contents are just random.
Its still a bug.
Manitou showed you that the results are the same.
..and its buggy. If you don't read the Serial data it gets called again and again and again.. From my understanding an event should be called ONCE - at least the name "event" suggests that.
That...
Not exactly...
void yield(void)
{
static uint8_t running=0;
if (!yield_active_check_flags) return; // nothing to do
if (running) return; // TODO: does this need to be atomic?...
Yup, that works good, but still leaves the rest of the EventResponder code (like the triggering of events and that timer that get's called with every systick)
@mena, looks like a bug in your program.
As long nothing disables interrupts, the highest priority one has deterministic timing. Wether it has an rtos or not. The problem is not the OS - it's the Teensy core (and libs)
The Teensy 4x does it in hardware (where possible), and there is no sign that it would work wrong.
Can you post code, please? I'll run it on both, Teensy and ESP.
64Bit is double.
I measured the time for open() a file from SD (aif in this case). It's around 0.5..2.5 ms most of the time. Sometimes (seldom) a little more.
But yes, fast SPI filesystem would be better....
I think an rtos would benefit from the 1176 mailboxes. They couldn't be used if an eventresponder interferes.
In principle there could be both - eventresponder and rtos. However, it would be a bad...
That's also the reason why a "slow" ESP can be faster - it is able to do other things during the wait.
Reentrancy: Yes, you know why and how to avoid it. A beginner does not know that - and Arduino...
They are not reentrant. Nothing is reentrant on Teensy. And they are blocking.
For example, a simple print is likely to crash or least will do weird things if used by different tasks. To fix that...
No... nobody uses it. I'm not arware of any questions or mentions here - means there can't be many users of it. So it does not hurt to remove it completely.
The point is, the core itself and basic things like I2C, SPI etc are not compatible to a rtos.
I think it was just missed until now. The sweet spot to start with it was missed.
Meanwhile every...
Would you say, ESP is not Arduino compatible? You can completely ignore the fact that it has an rtos and upload a simple sketch with the usual "loop()". Saying ESP is not Arduino compatible requires...
That is certainly in the eye of the beholder.
If there was a really good reason, there would be no obstacle to give it. But this reason is obviously "secret" - nobody but Paul knows it. Since even...
Hi, you might be interested in this: https://forum.pjrc.com/threads/38988-Bat-detector?highlight=bat+ultrasonic
As far I know it's a completed, fully working project.
3 chips, 2 places where you can solder... one soldered to the top ... if that does not answer the question, i don't know... :)
Then, there is the 4.0 schematic...
A simple look at the bottom of a 4.1 shows that there are only two places where an optional chip can be soldered.. which would have answered your question ;)...
uploaded another fix ;)
Take your time, no hurry.
It was never meant to be that "exact".. it's just a dumb player. But if it is possible.. why not.
I like the idea of the sines.. did not think of them as an instrument...
Have you tried pinMode(x, INPUT_DISABLE)?
EDIT: Lol, misread your post... ignore that, please :)
Looks like the two sines are canceling out each other.. so it's timing..
indeed if I rewrite the loop to :
AudioNoInterrupts();
for (int i = 0; i<2; i++)
{
...
IF it was playing, the amplitude should be higher, like in picture #2. But it IS playing, because you see 2 glitches in the first sines (exactly the length of the shorter file)).
Any Idea?
The...
Uploaded the EOF fix..
Great!
I hope the faint click is caused by my samples... however, indeed there seems to be a problem:...
Ha! When I recorded over a longer time check if the "added too much zeroes" issue from above was fixed, i finally saw the problem at start. It does not happen often, perhaps 1 of 20 times?
27434...
Yes, don't use Windows :)
You would need to fix the Windows driver. It's (mainly) not a Teensy issue, it's a common problem with other MCUs and Windows, too. However, I've seen data-loss due to a...
Ok, my changes seem to have fixed the issue.
The other issue, with the delay at end is.. hm, i did not think of this.. or..better.. did not think of this effect as a problem :)
The player works...
Thank you! Can you upload the file please?
If fixed some things yesterday. Do you use the newest version?
@Re: 9 Blinks:
it works for me to just add a FLASHMEM to TEENSY40\hal.c (Line 652):
//----------------------------------------------------------------------------------
FLASHMEM
void...
As said - it's just thowing darts..
__disable_irq()
__enable_irq()
These are global, take no parameter, and disable/enable _all_ interrupts (but NMI)
@Tim, probably something wrong with your install.
I do not get linking errors with T4.0 / TD1.56 - only two warnings:
...
Which player do you use? It might a problem there.
For example, there is code like this:
#if defined(HAS_KINETIS_SDHC)
if (!(SIM_SCGC3 & SIM_SCGC3_SDHC)) AudioStartUsingSPI();
#else
...
Disable them after this line:
void ResetHandler(void)
{
unsigned int i;
!!here!!
enable them here:
Not sure if this is the reason here, in this special case:
Startup-c has a bug. There is (often) an interrupt happening, quite early , in the first lines of startup.c
Paul didn't want to insert...
Oh my.. you did not mention any timestamp in post #1.
Yes just use delay().
You can also try a pin interrupt which store millis() or micros().
But most important is to give us all informatio...
Third post in the second link you gave :) This shows how to set the speed @ runtime. Note, you can't go slower than 24MHz if you need USB.
There are threads about power consumption, too. But don't...
Yes, there are some threads here about it :) A search should be successful...