Indeed, sounds like a Win issue - the few cmdline t_sermon dumps were garbage free output to file - it was good to see that finally.
Security:: for sure some of the dumps of garbage could have been who knows what for...
@mjs513 - I see that you added some stuff...
Note: I just pushed up a new branch DMA_SUPPORT -
Where I am trying get some of the examples to be able to build and then hopefully work like the ringBufferDMA test...
@Pete: Good observation. I modified this demo program from Frank DD4WHs original program. In it he defines BUFFER_SIZE = partition size, which is 128. For some reason I removed that line- probably because my older...
Replying to my own thread, as I found the cause of the issue I raised! The cipher mode used by AES encryption using CryptoAccel library appear to be Electronic Codebook (ECB) and the output corresponds just fine with...
Quick question, after playing around with the CryptoAccel library, I found that it utilizes the ECB cipher mode. This mode is known to have some security issues if repetitive text blocks are being encrypted. Does...
Sure does look like a bug in Windows, maybe even a buffer overflow, judging by the sudden appearance of stuff about PCI bus devices in what looks like 16 bit wchar format that Windows uses internally. That data sure...
Indeed Win CMD output is slow - that is why I was doing the 1,000 batches before printing even one buffer. Though doing 10K batches did not run any faster - likely the minimal code overhead to clean and check receive...
One more question then: since there's a lot more RAM onboard than on many other MCUs, I'd like to experiment with code loaded at runtime (either from flash or an SD card). If I do access everything through variables and...
Doing this :: T:\arduino_1.8.10\hardware\tools>teensy_serialmon.exe usb:0/140000/0/1 > seeme.txt
The created file this way doesn't seem to show the printed corrupt messages in a couple of tries. Also hitting ENTER...
@ Frank. Thank you- I'm pleased it ran nicely for you too. I couldn't find the mods mentioned above on my Github site, under Pull requests or Issues. Then I went to your site and found them. The Serial while command is...
@Brian:
I downloaded your library just to have a look. It doesn't compile because BUFFER_SIZE is not defined. Looking through previous messages here, I assume that it should be 128.
Pete
Odd things noted above - using sketch with no delays posted below.
Not sure if any of this is T4 related - but all make at this this Win_10 PC an unreliable test bed::
> I see garbage spew on GUI and TyCommander...
@ Frank. Thank you- I'm pleased it ran nicely for you too. I couldn't find the mods mentioned above on my Github site, under Pull requests or Issues. Then I went to your site and found them. The Serial while command is...
@mjs513 - Still totally distracted :D Hopefully later today I will maybe have the opportunity to concentrate a little.
I probably should start off hacking something up, but I find myself wanting to generalize...
@KurtE et.al.
Added the ADC compare piece of the puzzle. Only tested on case for comparing on one value. Still needs some work - since I think I messed upped what pins are on what adc in code. Need a break - been...
Unfortunately, I’m of no help with the Touch Bar. My 13” MacBook Pro from 2018 is the version without. I never saw a reason for spending additional money at gimmicks like this.
Thanks Theremingenieur, hpyle, grahamguitarman, jwx49 for testing. It's a huge help.
If I could ask you one more question... do you use the touch bar? I don't own any Macbooks new enough to have the touch bar, so I...
The urgent question right now is whether the USB code on the Teensy side is working properly. With the recent tests on issue #401, and many tests I did before this week's MacOS Catalina work, and with every indication...
One other variable to consider is your Mac's power source. Apple's CDC driver uses a *lot* of CPU time (for reasons unknown, Windows & Linux drivers don't do this) when receiving data at high speed. Sustained high...
Red LED blinking (slowly) means something is wrong with the USB cable or port. It only does the slow blink when you're in bootloader mode, but your PC hasn't performed any USB communication, not even enumeration to...
Simply including those other libs will not make Adafruit_NeoMatrix play nice. Adafruit designed their library to block interrupts.
To make this work smoothly, you need to completely remove all use of...
Windows CMD is slow, much slower than the Arduino Serial Monitor.
Usually when I run this, it will show an impossibly high lines/sec speed, like 600000 to 750000. But just by watching which digit of the count number...
While working on the teensy_serialmon.exe that's in 1.49-beta1, I did quite a bit of testing running it from a CMD window. It expects a single input on the command line, which is the port name shown in the lower right...
For a small WS2812 based led project I'm using both FastLED and Adafruit NeoMatrix libraries (mainly for displaying text) and this was running perfectly on an Arduino Nano. However, I need to control it with an iOS app...
Other than getting the index for the terminating character wrong the code from post 11 worked and I got the ACK back from a Teensy 2.0.
void onSysEx(byte *sysExBytes, unsigned int length){
if (sysExBytes == 0xF0 ...
Brian, your code runs and performs very well! Well done, thats very good!
I added some very small modifications in the example file --> AUDIO_BLOCK_SAMPLES, Serial printing processor load, fixing Serial while command...
@Paul - modified prior PC app to read 512 bytes in groups of 1,000 times - and sends each buffer back to the T4, but only prints the last buffer of the 1,000. One sign of trouble with that garbage buffer - though not...
Why would you want this? What's the practical purpose, that's worth risking having too many cooks in the kitchen?
If you want a big block of 100K for a buffer, it's so very simple to just create an array as a global...
Hello PJRC!
I got a Teensy 4.0 and soldered on the audio shield, following this tutorial: https://www.youtube.com/watch?v=UJcZxyB5rVc
Everything seemed fine, I plugged it in to my computer, the driver...
Indeed it is that thread. That post preceded the notes on T4 memory pjrc.com/store/teensy40.html
And above was right > what speed is RAM2 that it needs to be cached?
There is a memory thread - search forum for imxrt-size - details there may be helpful, also that exe imxrt-size will spit out info on what is allocated where at compile time. I posted an output of that in the 1.49 beta...
OK, that cleared many things for me already.
The thing I was mostly concerned about in the "bare minimum" setup was damaging or locking up the hardware by leaving something in an uninitialized state (not sure if...
I wrote a full library that does this with its own midi editor that is scalable and the editor is web based with also a desktop app running on electron. All done with sysex for communication, the library handles...
Technically, the linker only creates symbols used by startup.c. Compiling & linking your program results in a HEX file with data that goes only into the flash memory. All configuration of how the RAM gets used is done...
Yes, the documented memory layout is based on the defaults you get from startup.c and imxrt1062.ld.
But to some extent, it's also based on what the hardware provides. No matter what you do in software, the hardware...
OCRAM is all open in the TD 1.48 - for pending faster USB in TD 1.49 it looks like 12 KB is allocated to USB buffers for DMA access. When that is complete USB will be optional and turning it off should put that back to...
My son set me up on platformio with atom. I was amazed at how much more I could get done, vis-a-vis the Arduino IDE, on a Teensy 3.2. When the Teensy 4.0 came out, I redesigned my board for that (lots more rpms under...
OK, thanks for the info. I'll look around.
One more thing: when a new program is flashed onto the board, it's only writing to the flash, right? So technically I could instruct the linker to not cause anything to be...
Again hard to say what all you need or don't need. Or what your plans are.
I personally just use the Arduino setup, which is fine for the things I wish to do.
Understanding the board. I assume you found the...
I was playing with HTML today... didn't have a MIDI capable browser so I focused on building the string to paste into a MIDI utility... just leaving the WIP code here for further development.
When I'm at home with...
Hello,
I'm working on a project around the Teensy 4.0. The platform seems to be really powerful, but I wish the different features were better documented. For example, I managed to figure out how to do direct GPIO...
Get a large usb hub and run tycommander to manage and deploy to many teensies. I developed a custom usb backplane to manage and Maintain firmware to my t3.2 boards.
Just a quick status. Left it on for 4 hours last know. PC went to sleep. When I woke it up it was still running and spewing data. The processing sketch picked up as well.
@KurtE
Sorry for the delay but its probably not a bad idea. As we get more into the pins configs it will save from having to copy it in the libs all the time.
Glad you added xbara2 and xbara3. So far haven't had...
I've had a not-completely original idea that I've been kicking around for a while...
The Commodore 64 was designed to allow an alternate processor (specifically the Z80) to take over the bus and replace the 6510...
The code in the link above :: pjrc.com/threads/48450-uNav-AHRS?p=168449&viewfull=1#post168449
Puts the : attachInterrupt(digitalPinToInterrupt(GPS_SRX), GPS_serialrx_isr, RISING); - Directly on the Rx pin and it does...
That's the schematic for the Teensy 3.6, not the ref board. The big difference is the pins on the K66 are numbered for BGA and not the LQFP that's on the ref board. Ref board uses MKL04 instead of MKL02 that's on the...
Yes, I agree that it is indeed a good idea detach the interrupt on the RX watch pin when it's triggered, so it's not triggered on all the other data transitions.
Side question: You said: "Rx as a watch pin". Do you...
Thank you all for the suggestions. I will report back if I know more. Hopefully this crashes again in a timely fashion. My plan is to try one thing at a time until crash or "timeout" of a few days. This could be a...
@mjs513 - will take a look..
Here is a sublimetext mucked with table for XBar1...
Wonder this would be valid/reasonable addition for imxrt.h? And if so do I need to do XBAR2...
// XBAR1 Inputs and Outputs...
Don't update to Catalina. But DO run the 1.49-beta1 for Catalina on your Mac running Mojave. Also run the normal 1.49-beta1, where you install it into a copy of Arduino 1.8.10.
Those 2 are pretty much identical,...
I will try this too. I'm likely to copy files over my PlatformIO install too. Let's see if this approach with PlatformIO is viable...
I haven't switched to Catalina yet because of the 64-bit-only support. I still use...
I should add: I'm seeing this with Teensy 3's too, as of late. 3.2 and 3.5, so that probably narrows it down to my machine and nothing anything the Teensy is doing.
Have you tried with 1.49-beta1? Either the normal way or this build for Catalina? (which should work on Mojave)
The USB device code has some very substantial improvements in 1.49-beta1. The raw USB speed is...
@KurtE, @manitou, ...
For xbara1 stuff you can check out how I did I set it up for the encoder library. Made it pretty general or maybe not: https://github.com/mjs513/Teensy-4.x-Quad-Encoder-Library.
As for...
Hi Paul, any update on the USB type selection for Teensy 4? I got Teensy4 + Audio board to use for Line in to USB Audio and realized it doesn't work. Basically I need the USB > Audio. Any estimate on when this feature...
@mjs513, @PaulStoffregen @manitou, ...
Thought I would see how hard it is to do ADC using DMA at some specific sampling rate, Example for trying to guess if an power is running to a well pump, so with T3.6 I setup...
Another data point: I use platformio on macOS with T4 and have never had a system crash.
Also, can you reproduce the problem _without_ reprogramming the teensy?
Yep, this is a hard one because it's very difficult to reproduce. I'll take your suggestions and do the best I can to figure out what the HEX file was, which step in the procedure was happening, etc., and then re-try...
Setting up the 'Rx' as a watch pin served the desired purpose of seeing the Start of data bits in that case, so no need for low level UART operation was needed in that code. And with only 5 or 10 messages per second...
That is more than a simple blink ... so added details might be helpful. Also interesting if the same process using the standard IDE install with known TeensyDuino can reproduce - it may be T4 or PlatformIO interaction...
ok, so i should type cast the void pointer as i pass it my function in main that should help ? i've checked and it all looks like uint8_t data types anyway.
I was wondering if I'm using the pointer correctly in my...
And you also can get into problems if you use an unaligned pointer to load up multiple bytes. As I recall there are a few bytes in the Teensy 3.2 address range where doing an int load just does not work.
And there...
Thank you both for attempting to help me.
@defragster - I'm running tests using a development version of my TeensyDMX program, but I have seen some panics a couple of times when testing something simple (10's of...
You need to copy the arm_math.h, arm_const_structs.h and arm_comman_tables.h to the teensy ".../cores/teensy3/" directory in Arduino renaming or removing the old arm_math.h and arm_comman_tables.h. Then replace or...
It turns out that a lot of decent timing information can be gleaned with just the UART signals. (Verified with a scope and comparing with ostensibly-measured values.) I was avoiding using a separate pin (I'll call it a...
ok think I sorted it, I deleted some lines as per: https://forum.pjrc.com/archive/index.php/t-34685.html and linked C++ via boards.text (teensy31.build.flags.libs=-lstdc++)
touch wood I haven't tested on teensy yet,...
Haha, no problem.
So the incoming audio is a human voice that you are trying to detect what frequency they are signing at? Not sure how you would "re-start the cycles" but you could look at source code and add a...
Good Morning @KurtE - days are all beginning to merge into one.
Solved my issue to get the current bits for adiv and clk and incorporated into the function. I also just pushed it to GitHub.
Cheers.
Hi @mjs513 - Yep more coffee (Feel free to PR it)! You probably know more about all of this than I do!
@jonr - DMA does not look too hard to add here... Again @manitou has example app, which I will try out soon
That looks better.
Yes, that would be a scope problem. The variables defined inside setup() are only in scope for that method, and once that method is finished executing, they're no longer in scope... and could no...
Thanks wcalvert! Like this? Quick question, I first tried putting those lines in setup(); and it didn't work until I moved them outside of the loop and setup functions. Is that a scope thing? Thanks for the advice!
...
@KurtE
Got the hack working, now you have more options than you can shake a stick for adc clock speed. Only thing I need to fix is:
//ADC1
//NOTE: Only works once - have to change ADIV and ADICLK to get current...