PDA

View Full Version : Teensyduino 1.54 Beta #4



Paul
11-04-2020, 09:39 AM
Here is a fourth beta test for Teensyduino 1.54.


Linux 32 bit:
https://www.pjrc.com/teensy/td_154-beta4/TeensyduinoInstall.linux32

Linux 64 bit:
https://www.pjrc.com/teensy/td_154-beta4/TeensyduinoInstall.linux64

Linux ARM:
https://www.pjrc.com/teensy/td_154-beta4/TeensyduinoInstall.linuxarm

Linux ARM64:
https://www.pjrc.com/teensy/td_154-beta4/TeensyduinoInstall.linuxaarch64

MacOS 10.10 to 10.15:
https://www.pjrc.com/teensy/td_154-beta4/Teensyduino_MacOS_Catalina.zip

MacOS 10.8 to 10.14:
https://www.pjrc.com/teensy/td_154-beta4/TeensyduinoInstall.dmg

Windows:
https://www.pjrc.com/teensy/td_154-beta4/TeensyduinoInstall.exe


Changes since Teensyduino 1.54-beta3 (https://forum.pjrc.com/threads/64235-Teensyduino-1-54-Beta-3):

Update NativeEthernet
Audio: Improve simultaneous WAV playing & add SimultaneousPlay test
SD default to 16 MHz SPI clock
Serial Monitor fix double spaced lines copied to clipboard
Serial Monitor avoid auto horizontal scroll on very long lines
Serial Monitor fix memory leak on MacOS

MovingAverage
11-04-2020, 11:51 AM
The link to the Catalina version doesn't seem to work!
EDIT: seems to be working now!

mjs513
11-04-2020, 11:53 AM
Installed over beta3 on a Win10x64 without issue.

Tested SD default to 16Mhz SPI Clock:
a. BUILTIN_SDCARD on T4.1 Listfiles.ino worked at 16Mhz no problem as well as the ILI9341_t3_Slideshow. Both tested with a 512Gb SD Card.
b, Tested a T3,2 with an external SDcard reader with a 32Gb SDcard and ran the ILI9341_t3_Slideshow. Images displayed correctly on a ILI9341 and no issue with reading SDcard

Serial Monitor fix double spaced lines copied to clipboard:

Initializing SD card...initialization done.

LOG_0816.csv 4364

OV7670.bmp 153666

System Volume Information/

WPSettings.dat 12

IndexerVolumeGuid 76

mtpindex.dat 0

datalog.txt 5363

LOG_0001.csv 86201

LOG_0000-afternno.csv 121978

LOG_00001.csv 65318

LOG_62620.csv 183998

perf.jpg 34910

squirrel_dither.jpg 39057

demo.jpg 40582

num3.wav 289750

num4.wav 260436

num5.wav 276426

num6.wav 260818

num1.wav 300028

num2.wav 266528

done!

Looks like still getting the extra lines on windows 10 while SerMon shows no extra lines

PaulStoffregen
11-04-2020, 12:06 PM
The link to the Catalina version doesn't seem to work!

Opps, sorry, my mistake, forgot to copy it over from my mac before uploading. I've uploaded the file just now.

mjs513
11-04-2020, 12:14 PM
Opps, sorry, my mistake, forgot to copy it over from my mac before uploading. I've uploaded the file just now.

While I don't have a mac at least I can verify thats its there and can be downloaded - at least on a Win10 machine :)

KurtE
11-04-2020, 01:42 PM
Tried the Linux Arm 64, it downloads, but if you try to run it, it gets a Bus error (core dumped) error.

Downloaded twice. Actually I think maybe three times. Tried wget, but for some reason I ran the beta 2 version? So I tried loading up desktop with firefox to download... Got the crash, In process of wget again

Still failed

Should mention: This is an RPI4-8 running Ubuntu 64 bit... The Beta 2 ran.

PaulStoffregen
11-04-2020, 01:48 PM
Oh, not good. I had problems with my Jetson TX2 used the build that code, crashing during the build. It seemed to be working this time, but the truth is I haven't tested it in any way. That TX2 doesn't even have a monitor or keyboard connected right now. Might be a couple weeks until I can pull it out onto a workbench and try to figure out what's going wrong.

KurtE
11-04-2020, 02:03 PM
Understood - I thought I would try it out again. More curious to see if by some magic the inability to have the Arduino IDE launch the Teensy app in a working state to be able to program a teensy was resolved. I think the last details about this was in the beta 2 thread. (https://forum.pjrc.com/threads/64023-Teensyduino-1-54-Beta-2?p=257054&viewfull=1#post257054)

My guess the Jetson is quicker to do the stuff, but my setup for this is as I mentioned an RPI4-8 (the newest), with firmware that allows you to boot off of USB. I then have an SSD drive connected up to boot. At one point I had the Raspian OS 64 bit Beta installed. Not what state that is in now.

Currently I installed the Ubuntu Server and then added the GUI...

@mjs513 has a setup as well.

PaulStoffregen
11-04-2020, 02:14 PM
Serial Monitor fix double spaced lines copied to clipboard:

I retested this again on Windows 10 and I can't reproduce the problem.

22308

Any chance there might have been an instance of teensy_ports.exe running while you installed? The installer is supposed to stop if Windows reports any error writing, so I can't understand how, but maybe teensy_ports.exe didn't get updated?

KurtE
11-04-2020, 02:22 PM
I installed Beta4 on W10/64....

Reprogrammed T3.2 with listfiles example with external reader:

Initializing SD card...initialization done.

System Volume Information/

IndexerVolumeGuid 76

WPSettings.dat 12

LaikH.JPG 2801

hallow.JPG 21026

DRAKE.JPG 15775

done!


22309

22310

Update: If instead I choose the board under Serial ports and not under Teensy ports, than it Looks like I get single spacing...

Initializing SD card...initialization done.
System Volume Information/
IndexerVolumeGuid 76
WPSettings.dat 12
LaikH.JPG 2801
hallow.JPG 21026
DRAKE.JPG 15775
done!

MovingAverage
11-04-2020, 02:22 PM
I didn't really know where to post about it, but I made a new thread regarding an issue that I have since Teensyduino 1.52 and which is still present in this version. I tried to address that already in the betathread of 1.52 but wasn't really able to explain myself.

I tried to list all the information and knowledge that I have regarding this problem, and would love if we could solve that! Here is the link to the thread (https://forum.pjrc.com/threads/64311-Memory-issue-with-AudioLibrary-Teensyduino-since-1-52-1-54b)

Thanks for all the great work and help.

PaulStoffregen
11-04-2020, 02:31 PM
Ugh, tried again and this time I did get double spaced.

Looks like I have more work to do on this issue....

mjs513
11-04-2020, 02:32 PM
I installed Beta4 on W10/64....

Reprogrammed T3.2 with listfiles example with external reader:

Initializing SD card...initialization done.

System Volume Information/

IndexerVolumeGuid 76

WPSettings.dat 12

LaikH.JPG 2801

hallow.JPG 21026

DRAKE.JPG 15775

done!


22309

22310

Update: If instead I choose the board under Serial ports and not under Teensy ports, than it Looks like I get single spacing...

Initializing SD card...initialization done.
System Volume Information/
IndexerVolumeGuid 76
WPSettings.dat 12
LaikH.JPG 2801
hallow.JPG 21026
DRAKE.JPG 15775
done!


I installed clean copy of Arduino-1.8.13 along with beta4. Can confirm what @KurtE posted on the SerMon issue with Win10x64

As long as you "choosing the board under Serial ports and not under Teensy ports, than it Looks like I get single spacing...". If you choose Serial under TeensyPorts you get the double space. Tested with Builtin_sdcard on a T4.1

KurtE
11-04-2020, 02:59 PM
Just thought I would mention I again tried the SD Card list program (listfiles) External SPI reader works on both T3.2 and T4 (Sparkfun unit...)
Neither one will read the Samsung 32 EVO disk... Fails to initialize.

BUT if I build T4 with BUILTIN_SDCARD - it works with the EVO card...

KurtE
11-04-2020, 07:30 PM
@Paul and others...

And again something completely random...

Over the last few days, been hit again with people needing to increase the RX and/or TX buffers of Serial ports to get there stuff to work. Fixed it for T4... Wondering if worth it for T3.x/LC -

So far I hacked up the same type changes for Serial 1 (have not done 2-8 yet) as not sure if this is something desired or not

I pushed up the changes into the branch: https://github.com/KurtE/cores/tree/T3X_SerialX_AddMemory

Again only Serial1 done so far. Question is, is it worth completing?

Also would probably need some help testing once completed.

defragster
11-04-2020, 08:13 PM
Win 10 install of TD 1.54 b4 no problem here - compiled the active sketch Audio w/SD on T_3.2 as before.

@KurtE - speaking of Random. Question: Did the rewrite of UART_Serial# result in no alloc of buffers for unused Serial#'s?

If not: With the Dynamic alloc of UART Serial# buffer working. Could it only alloc() the default buffer on Serial#.begin() [when a null *buff?] And if larger buffer wanted then do the ..._AddMemory() before .begin() to get a single buffer of desired size - and resulting in a non-null *buff when .begin() happens?

KurtE
11-04-2020, 09:57 PM
Just thought I would mention I again tried the SD Card list program (listfiles) External SPI reader works on both T3.2 and T4 (Sparkfun unit...)
Neither one will read the Samsung 32 EVO disk... Fails to initialize.

BUT if I build T4 with BUILTIN_SDCARD - it works with the EVO card...

Quick update here. I have been outputting some debug information in the code and output:

Initializing SD card...CardBegin Error: 12

SDFAT Cardbegin failed
initialization failed!
done!
Press any key to rerun


I believe that error code is:0X12,SD_CARD_ERROR_CMD58 - Read OCR register

Which in SdSpiCard.cpp there is code:

// if SD2 read OCR register to check for SDHC card
if (type() == SD_CARD_TYPE_SD2) {
if (cardCommand(CMD58, 0)) {
error(SD_CARD_ERROR_CMD58);
goto fail;
}
if ((spiReceive() & 0XC0) == 0XC0) {


So it looks like this command is failing...

PaulStoffregen
11-04-2020, 10:32 PM
FWIW, I've done nearly all my testing with this card. It has always worked. But I've only tested it in SPI mode with PJRC's 3 shields having SD sockets (audio (https://www.pjrc.com/store/teensy3_audio.html), wiz820 (https://www.pjrc.com/store/wiz820_sd_adaptor.html), and SD adaptor for Teensy 2.0 (https://www.pjrc.com/store/sd_adaptor.html)).

22313

KurtE
11-04-2020, 10:34 PM
Win 10 install of TD 1.54 b4 no problem here - compiled the active sketch Audio w/SD on T_3.2 as before.

@KurtE - speaking of Random. Question: Did the rewrite of UART_Serial# result in no alloc of buffers for unused Serial#'s?

If not: With the Dynamic alloc of UART Serial# buffer working. Could it only alloc() the default buffer on Serial#.begin() [when a null *buff?] And if larger buffer wanted then do the ..._AddMemory() before .begin() to get a single buffer of desired size - and resulting in a non-null *buff when .begin() happens?

It should be setup now that only those Serial objects that are used are brought into the sketch. including the event objects and the like.

Earlier when we discussed the idea of adding memory to the buffers. There were those that did not want to use malloc or the like, but instead have static buffers as to make it easier to see if their sketch is running low on memory. At one point I thought about adding simple addMemory...(nullptr, 128) it would do the malloc for you... But I am pretty sure punted as the caller could have done that as well.

KurtE
11-04-2020, 10:53 PM
FWIW, I've done nearly all my testing with this card. It has always worked. But I've only tested it in SPI mode with PJRC's 3 shields having SD sockets (audio (https://www.pjrc.com/store/teensy3_audio.html), wiz820 (https://www.pjrc.com/store/wiz820_sd_adaptor.html), and SD adaptor for Teensy 2.0 (https://www.pjrc.com/store/sd_adaptor.html)).

22313
The one that I have had issues with is:
22314
Sorry image is quick and dirty...

PaulStoffregen
11-04-2020, 10:58 PM
Is it this card?

https://www.amazon.com/Samsung-MicroSDHC-Adapter-MB-ME32GA-AM/dp/B06XWN9Q99

If so, I'll buy a couple and test here.

(and is it just me, or does the existence of 512GB and 1TB micro SD cards seem kinda surreal?)

KurtE
11-04-2020, 11:01 PM
Yep that is the one, It showed I purchased it back in July 2018

PaulStoffregen
11-04-2020, 11:11 PM
The card that was giving me occasional startup trouble was also a Samsung "EVO Select U1". It was 128GB. I sent a package to Bill Greiman with hardware for testing and I included that troublesome card, so it's no longer here.

I just looked through my collection of cards. The Samsung ones I have are "EVO Plus U1" or "EVO Select U3". I currently don't have any "EVO Select U1" cards. Will get 2 of those from Amazon soon.

Info I can find online suggests U1 means 10 Mbyte/sec and U3 means 30 Mbyte/sec. I have no idea what the difference between Plus vs Select is, other than the color. But I did find at least some conversation claiming there is a substantial difference between "EVO+" and "EVO Plus".

PaulStoffregen
11-04-2020, 11:32 PM
Here are 2 different Amazon page with cards that look identical. Both seems to be EVO Select U1.

https://www.amazon.com/Samsung-Select-Memory-MB-ME32DA-AM/dp/B01DOB6Y5Q/

https://www.amazon.com/Samsung-MicroSDHC-Adapter-MB-ME32GA-AM/dp/B06XWN9Q99/

But one is part number "MB-ME32DA/AM", the other is "MB-ME32GA/AM". I have no idea if the "D" vs "G" is meaningful.

Any idea if the card you're using is either if "DA/AM" or "GA/AM", or maybe even a 3rd part number that also looks identical?

KurtE
11-05-2020, 12:08 AM
Looks like mb-me32g on the back of the card.

As for the real differences the one that I don't have says(about twice as expensive): Up to 80MB/s transfer speed
The one I have says: Ultra-fast read write speeds: Up to 95MB/S Read and 20MB/S Write Speeds;

mjs513
11-05-2020, 12:59 AM
Is it this card?

https://www.amazon.com/Samsung-MicroSDHC-Adapter-MB-ME32GA-AM/dp/B06XWN9Q99

If so, I'll buy a couple and test here.

(and is it just me, or does the existence of 512GB and 1TB micro SD cards seem kinda surreal?)

Just got back on-line. 512GB and 1TB = very surreal. When I ordered the 512GB samsung was kind of nervous but worked, was nervous about the 1TB card.

Just ordered the pair that of 32GB that was posted - should get on Friday.

KurtE
11-05-2020, 03:36 AM
@Paul and others...

And again something completely random...

Over the last few days, been hit again with people needing to increase the RX and/or TX buffers of Serial ports to get there stuff to work. Fixed it for T4... Wondering if worth it for T3.x/LC -

So far I hacked up the same type changes for Serial 1 (have not done 2-8 yet) as not sure if this is something desired or not

I pushed up the changes into the branch: https://github.com/KurtE/cores/tree/T3X_SerialX_AddMemory

Again only Serial1 done so far. Question is, is it worth completing?

Also would probably need some help testing once completed.

Again played a little more and did the changes for Serial2-6 have not done the LPUART (Serial6 on T3.6). Ran simple test code USBToSerial to make sure I could at least ring back each of the serial ports.


/* USB to Serial - Teensy becomes a USB to Serial converter
http://dorkbotpdx.org/blog/paul/teensy_as_benito_at_57600_baud

You must select Serial from the "Tools > USB Type" menu

This example code is in the public domain.
*/

// set this to the hardware serial port you wish to use
#define HWSERIAL Serial5
uint8_t tx_buffer[128];
uint8_t rx_buffer[128];

unsigned long baud = 19200;
const int reset_pin = 4;
const int led_pin = 13; // 13 = Teensy 3.X & LC
// 11 = Teensy 2.0
// 6 = Teensy++ 2.0
void setup()
{
pinMode(led_pin, OUTPUT);
digitalWrite(led_pin, LOW);
digitalWrite(reset_pin, HIGH);
pinMode(reset_pin, OUTPUT);
Serial.begin(baud); // USB, communication to PC or Mac
HWSERIAL.begin(baud); // communication to hardware serial
HWSERIAL.addMemoryForRead(rx_buffer, sizeof(rx_buffer));
HWSERIAL.addMemoryForWrite(tx_buffer, sizeof(tx_buffer));
}

long led_on_time=0;
byte buffer[80];
unsigned char prev_dtr = 0;

void loop()
{
unsigned char dtr;
int rd, wr, n;

// check if any data has arrived on the USB virtual serial port
rd = Serial.available();
if (rd > 0) {
// check if the hardware serial port is ready to transmit
wr = HWSERIAL.availableForWrite();
Serial.printf("(%d : %d)\n", rd, wr);
if (wr > 0) {
// compute how much data to move, the smallest
// of rd, wr and the buffer size
if (rd > wr) rd = wr;
if (rd > 80) rd = 80;
// read data from the USB port
n = Serial.readBytes((char *)buffer, rd);
// write it to the hardware serial port
HWSERIAL.write(buffer, n);
// turn on the LED to indicate activity
digitalWrite(led_pin, HIGH);
led_on_time = millis();
}
}

// check if any data has arrived on the hardware serial port
rd = HWSERIAL.available();
if (rd > 0) {
// check if the USB virtual serial port is ready to transmit
wr = Serial.availableForWrite();
if (wr > 0) {
// compute how much data to move, the smallest
// of rd, wr and the buffer size
if (rd > wr) rd = wr;
if (rd > 80) rd = 80;
// read data from the hardware serial port
n = HWSERIAL.readBytes((char *)buffer, rd);
// write it to the USB port
Serial.write(buffer, n);
// turn on the LED to indicate activity
digitalWrite(led_pin, HIGH);
led_on_time = millis();
}
}

// check if the USB virtual serial port has raised DTR
dtr = Serial.dtr();
if (dtr && !prev_dtr) {
digitalWrite(reset_pin, LOW);
delayMicroseconds(250);
digitalWrite(reset_pin, HIGH);
}
prev_dtr = dtr;

// if the LED has been left on without more activity, turn it off
if (millis() - led_on_time > 3) {
digitalWrite(led_pin, LOW);
}

// check if the USB virtual serial wants a new baud rate
if (Serial.baud() != baud) {
baud = Serial.baud();
if (baud == 57600) {
// This ugly hack is necessary for talking
// to the arduino bootloader, which actually
// communicates at 58824 baud (+2.1% error).
// Teensyduino will configure the UART for
// the closest baud rate, which is 57143
// baud (-0.8% error). Serial communication
// can tolerate about 2.5% error, so the
// combined error is too large. Simply
// setting the baud rate to the same as
// arduino's actual baud rate works.
HWSERIAL.begin(58824);
} else {
HWSERIAL.begin(baud);
}
}
}

Again would be better to get some more testing, but wondering if this is something we would like in PR?

Some of the subtle things to test out include things like the watermarks and when to assert the RTS.

WMXZ
11-05-2020, 06:35 AM
(and is it just me, or does the existence of 512GB and 1TB micro SD cards seem kinda surreal?)

Used 512GB without issues with T3.6 (so far) and have to transition to 1TB cards soon (T4.1 with multiple SPI microSD).

PaulStoffregen
11-05-2020, 06:46 AM
512GB and 1TB = very surreal. When I ordered the 512GB samsung was kind of nervous but worked, was nervous about the 1TB card.

Together with the normal cards, I ordered one of the cheap no-name 512GB cards (https://www.amazon.com/Adapter-Designed-Android-Smartphones-Compatible/dp/B08HHZC53T) with the assumption it's really just 32 or 64 and would likely get corrupted if more is written. Last night I copied 390GB of MP3 files onto that card. Right now I'm listening to one of the first group copied. I'm still expecting the capacity claim to be a lie, but the fact that it's working at all seems pretty amazing!

mjs513
11-07-2020, 02:43 PM
Here are 2 different Amazon page with cards that look identical. Both seems to be EVO Select U1.

https://www.amazon.com/Samsung-Select-Memory-MB-ME32DA-AM/dp/B01DOB6Y5Q/

https://www.amazon.com/Samsung-MicroSDHC-Adapter-MB-ME32GA-AM/dp/B06XWN9Q99/

But one is part number "MB-ME32DA/AM", the other is "MB-ME32GA/AM". I have no idea if the "D" vs "G" is meaningful.

Any idea if the card you're using is either if "DA/AM" or "GA/AM", or maybe even a 3rd part number that also looks identical?

Just tested both chips on the T4.2 on the BuiltinSDCard and on the T3.2 with an external Card reader, both worked no problem. Also tested with an external card reader on a T4.0.


T4.1 on Internal Card Reader - Samsung EVO MB-ME32GA/AM

Cardinfo.ino

Initializing SD card...Wiring is correct and a card is present.

Card type: SDHC

Volume type is FAT32

Volume size (Kbytes): 31248384
Volume size (Mbytes): 30516

ListFiles.ino

Initializing SD card...initialization done.
System Volume Information/
IndexerVolumeGuid 76
raven-node-sch.pdf 82781
IMXRT1050RM.pdf 36713248
2016-12-22T20_37_57.578Z-teensy-can-dual-pinout.jpg 202297
Teensy32Node.pdf 84008
SN65HVD230-CAN-Board-Schematic.pdf 55749
RavenNode-cca.pdf 67259
sn65hvd233??.jpg 107405
5.jpg 10016
done!

---------------------------------------------------

T3,2 External Card Reader
Initializing SD card...initialization done.
System Volume Information/
IndexerVolumeGuid 76
raven-node-sch.pdf 82781
IMXRT1050RM.pdf 36713248
2016-12-22T20_37_57.578Z-teensy-can-dual-pinout.jpg 202297
Teensy32Node.pdf 84008
SN65HVD230-CAN-Board-Schematic.pdf 55749
RavenNode-cca.pdf 67259
sn65hvd233??.jpg 107405
5.jpg 10016
done!

-------------------------------------------
-------------------------------------------
T3,2 External Card Reader - Samsung EVO MB-ME32DA/AM
ListFiles.ino

Initializing SD card...initialization done.
System Volume Information/
IndexerVolumeGuid 76
USB_Host_Shield_Library_2.0_T4/
address.h 10297
adk.cpp 12820
adk.h 4544
avrpins.h 42758
BTD.cpp 62734
BTD.h 25536
BTHID.cpp 22599
BTHID.h 5438
cdcacm.cpp 11286
cdcacm.h 9665
cdcftdi.cpp 11747
cdcftdi.h 5764
cdcprolific.cpp 6712
cdcprolific.h 6693
cdc_XR21B1411.cpp 5872
cdc_XR21B1411.h 13301
confdescparser.h 10372
controllerEnums.h 5090
gpl2.txt 18009
hexdump.h 2136
hidboot.cpp 7955
hidboot.h 21296
hidcomposite.cpp 12848
hidcomposite.h 3614
hidescriptorparser.cpp 58835
hidescriptorparser.h 6899
hiduniversal.cpp 13307
hiduniversal.h 3636
hidusagestr.h 54645
hidusagetitlearrays.cpp 28774
keywords.txt 7989
library.json 1185
library.properties 773
macros.h 3986
masstorage.cpp 42701
masstorage.h 19504
max3421e.h 6166
max_LCD.cpp 7110
max_LCD.h 3045
message.cpp 3016
message.h 2579
parsetools.cpp 2292
parsetools.h 3933
printhex.h 2237
PS3BT.cpp 32398
PS3BT.h 9712
PS3Enums.h 4246
PS3USB.cpp 22951
PS3USB.h 11651
PS4BT.h 4711
PS4Parser.cpp 6149
PS4Parser.h 14364
PS4USB.h 4915
PSBuzz.cpp 3652
PSBuzz.h 6843
README.md 20303
settings.h 6508
sink_parser.h 1173
SPP.cpp 47409
SPP.h 8473
Usb.cpp 35086
Usb.h 1177
UsbCore.h 13389
usbhid.cpp 4897
usbhid.h 7496
usbhost.h 20866
usbhub.cpp 14143
usbhub.h 12062
usbh_midi.cpp 22363
usbh_midi.h 3793
usb_ch9.h 9649
version_helper.h 4783
Wii.cpp 73759
Wii.h 17918
WiiCameraReadme.md 913
xboxEnums.h 1683
XBOXOLD.cpp 12016
XBOXOLD.h 6729
XBOXONE.cpp 17687
XBOXONE.h 9447
XBOXRECV.cpp 23171
XBOXRECV.h 11050
XBOXUSB.cpp 13099
XBOXUSB.h 8567
examples/
acm/
acm_terminal/
acm_terminal.ino 2325
pgmstrings.h 2803
adk/
adk_barcode/
adk_barcode.ino 2095
ArduinoBlinkLED/
ArduinoBlinkLED.ino 2873
demokit_20/
demokit_20.ino 2381
term_test/
term_test.ino 1678
term_time/
term_time.ino 1410
Bluetooth/
BTHID/
BTHID.ino 1880
KeyboardParser.h 3358
MouseParser.h 1203
PS3BT/
PS3BT.ino 5995
PS3Multi/
PS3Multi.ino 5476
PS3SPP/
PS3SPP.ino 5314
PS4BT/
PS4BT.ino 5365
SPP/
SPP.ino 1648
SPPMulti/
SPPMulti.ino 2390
Wii/
Wii.ino 3638
WiiBalanceBoard/
WiiBalanceBoard.ino 1731
WiiIRCamera/
WiiIRCamera.ino 4832
WiiMulti/
WiiMulti.ino 4595
WiiUProController/
WiiUProController.ino 3533
board_qc/
board_qc.ino 13849
cdc_XR21B1411/
XR_terminal/
XR_terminal.ino 2155
ftdi/
USBFTDILoopback/
pgmstrings.h 2803
USBFTDILoopback.ino 2155
HID/
le3dp/
le3dp.ino 1063
le3dp_rptparser.cpp 1167
le3dp_rptparser.h 819
scale/
scale.ino 1350
scale_rptparser.cpp 3010
scale_rptparser.h 1030
SRWS1/
SRWS1.cpp 1961
SRWS1.h 3129
SRWS1.ino 5890
USBHIDBootKbd/
USBHIDBootKbd.ino 2983
USBHIDBootKbdAndMouse/
USBHIDBootKbdAndMouse.ino 4331
USBHIDBootMouse/
USBHIDBootMouse.ino 1798
USBHIDJoystick/
hidjoystickrptparser.cpp 2704
hidjoystickrptparser.h 808
USBHIDJoystick.ino 876
USBHIDMultimediaKbd/
USBHIDMultimediaKbd.ino 1671
USBHID_desc/
pgmstrings.h 2803
USBHID_desc.ino 1524
hub_demo/
hub_demo.ino 11742
pgmstrings.h 2803
max_LCD/
max_LCD.ino 806
pl2303/
pl2303_gprs_terminal/
pl2303_gprs_terminal.ino 2469
pl2303_gps/
pl2303_gps.ino 2517
pl2303_tinygps/
pl2303_tinygps.ino 6523
pl2303_xbee_terminal/
pl2303_xbee_terminal.ino 2885
PS3USB/
PS3USB.ino 4722
PS4USB/
PS4USB.ino 4571
PSBuzz/
PSBuzz.ino 1317
testusbhostFAT/
Makefile 1901
README.md 1229
testusbhostFAT.ino 31718
USBH_MIDI/
bidirectional_converter/
bidirectional_converter.ino 3584
eVY1_sample/
eVY1_sample.ino 1726
USBH_MIDI_dump/
USBH_MIDI_dump.ino 2149
USB_MIDI_converter/
USB_MIDI_converter.ino 1821
USB_MIDI_converter_multi/
USB_MIDI_converter_multi.ino 2016
USB_desc/
pgmstrings.h 2803
USB_desc.ino 9507
Xbox/
XBOXOLD/
XBOXOLD.ino 3718
XBOXONE/
XBOXONE.ino 4064
XBOXRECV/
XBOXRECV.ino 4469
XBOXUSB/
XBOXUSB.ino 3599
5.jpg 10016
069_181.pdf 2919298
74HC_HCT1G125.pdf 198107
301_canopen (1).pdf 1313731
done!
------------------------------------------------
T4.2 Builtin-SDCARD - ListFiles.ino
Initializing SD card...initialization done.
System Volume Information/
IndexerVolumeGuid 76
USB_Host_Shield_Library_2.0_T4/
address.h 10297
adk.cpp 12820
adk.h 4544
avrpins.h 42758
BTD.cpp 62734
BTD.h 25536
BTHID.cpp 22599
BTHID.h 5438
cdcacm.cpp 11286
cdcacm.h 9665
cdcftdi.cpp 11747
cdcftdi.h 5764
cdcprolific.cpp 6712
cdcprolific.h 6693
cdc_XR21B1411.cpp 5872
cdc_XR21B1411.h 13301
confdescparser.h 10372
controllerEnums.h 5090
gpl2.txt 18009
hexdump.h 2136
hidboot.cpp 7955
hidboot.h 21296
hidcomposite.cpp 12848
hidcomposite.h 3614
hidescriptorparser.cpp 58835
hidescriptorparser.h 6899
hiduniversal.cpp 13307
hiduniversal.h 3636
hidusagestr.h 54645
hidusagetitlearrays.cpp 28774
keywords.txt 7989
library.json 1185
library.properties 773
macros.h 3986
masstorage.cpp 42701
masstorage.h 19504
max3421e.h 6166
max_LCD.cpp 7110
max_LCD.h 3045
message.cpp 3016
message.h 2579
parsetools.cpp 2292
parsetools.h 3933
printhex.h 2237
PS3BT.cpp 32398
PS3BT.h 9712
PS3Enums.h 4246
PS3USB.cpp 22951
PS3USB.h 11651
PS4BT.h 4711
PS4Parser.cpp 6149
PS4Parser.h 14364
PS4USB.h 4915
PSBuzz.cpp 3652
PSBuzz.h 6843
README.md 20303
settings.h 6508
sink_parser.h 1173
SPP.cpp 47409
SPP.h 8473
Usb.cpp 35086
Usb.h 1177
UsbCore.h 13389
usbhid.cpp 4897
usbhid.h 7496
usbhost.h 20866
usbhub.cpp 14143
usbhub.h 12062
usbh_midi.cpp 22363
usbh_midi.h 3793
usb_ch9.h 9649
version_helper.h 4783
Wii.cpp 73759
Wii.h 17918
WiiCameraReadme.md 913
xboxEnums.h 1683
XBOXOLD.cpp 12016
XBOXOLD.h 6729
XBOXONE.cpp 17687
XBOXONE.h 9447
XBOXRECV.cpp 23171
XBOXRECV.h 11050
XBOXUSB.cpp 13099
XBOXUSB.h 8567
examples/
acm/
acm_terminal/
acm_terminal.ino 2325
pgmstrings.h 2803
adk/
adk_barcode/
adk_barcode.ino 2095
ArduinoBlinkLED/
ArduinoBlinkLED.ino 2873
demokit_20/
demokit_20.ino 2381
term_test/
term_test.ino 1678
term_time/
term_time.ino 1410
Bluetooth/
BTHID/
BTHID.ino 1880
KeyboardParser.h 3358
MouseParser.h 1203
PS3BT/
PS3BT.ino 5995
PS3Multi/
PS3Multi.ino 5476
PS3SPP/
PS3SPP.ino 5314
PS4BT/
PS4BT.ino 5365
SPP/
SPP.ino 1648
SPPMulti/
SPPMulti.ino 2390
Wii/
Wii.ino 3638
WiiBalanceBoard/
WiiBalanceBoard.ino 1731
WiiIRCamera/
WiiIRCamera.ino 4832
WiiMulti/
WiiMulti.ino 4595
WiiUProController/
WiiUProController.ino 3533
board_qc/
board_qc.ino 13849
cdc_XR21B1411/
XR_terminal/
XR_terminal.ino 2155
ftdi/
USBFTDILoopback/
pgmstrings.h 2803
USBFTDILoopback.ino 2155
HID/
le3dp/
le3dp.ino 1063
le3dp_rptparser.cpp 1167
le3dp_rptparser.h 819
scale/
scale.ino 1350
scale_rptparser.cpp 3010
scale_rptparser.h 1030
SRWS1/
SRWS1.cpp 1961
SRWS1.h 3129
SRWS1.ino 5890
USBHIDBootKbd/
USBHIDBootKbd.ino 2983
USBHIDBootKbdAndMouse/
USBHIDBootKbdAndMouse.ino 4331
USBHIDBootMouse/
USBHIDBootMouse.ino 1798
USBHIDJoystick/
hidjoystickrptparser.cpp 2704
hidjoystickrptparser.h 808
USBHIDJoystick.ino 876
USBHIDMultimediaKbd/
USBHIDMultimediaKbd.ino 1671
USBHID_desc/
pgmstrings.h 2803
USBHID_desc.ino 1524
hub_demo/
hub_demo.ino 11742
pgmstrings.h 2803
max_LCD/
max_LCD.ino 806
pl2303/
pl2303_gprs_terminal/
pl2303_gprs_terminal.ino 2469
pl2303_gps/
pl2303_gps.ino 2517
pl2303_tinygps/
pl2303_tinygps.ino 6523
pl2303_xbee_terminal/
pl2303_xbee_terminal.ino 2885
PS3USB/
PS3USB.ino 4722
PS4USB/
PS4USB.ino 4571
PSBuzz/
PSBuzz.ino 1317
testusbhostFAT/
Makefile 1901
README.md 1229
testusbhostFAT.ino 31718
USBH_MIDI/
bidirectional_converter/
bidirectional_converter.ino 3584
eVY1_sample/
eVY1_sample.ino 1726
USBH_MIDI_dump/
USBH_MIDI_dump.ino 2149
USB_MIDI_converter/
USB_MIDI_converter.ino 1821
USB_MIDI_converter_multi/
USB_MIDI_converter_multi.ino 2016
USB_desc/
pgmstrings.h 2803
USB_desc.ino 9507
Xbox/
XBOXOLD/
XBOXOLD.ino 3718
XBOXONE/
XBOXONE.ino 4064
XBOXRECV/
XBOXRECV.ino 4469
XBOXUSB/
XBOXUSB.ino 3599
5.jpg 10016
069_181.pdf 2919298
74HC_HCT1G125.pdf 198107
301_canopen (1).pdf 1313731
done!

KurtE
11-07-2020, 06:06 PM
Thanks @mjs513,
Will retest the one I have, maybe with some other external SD reader. Like maybe one on an Adafruit display board... The one I was using was a sparkfun one with level shifters, which should work for 3.3 or 5v, but who knows, maybe something maybe sensitive on these type cards with signals coming and going through TXB104 shifters.

Note: I just ordered one of each also... Although for the one that supposedly matches the one I already had (cheaper one), I upped it to the 64mb version.

KurtE
11-07-2020, 09:23 PM
Hi @Paul and @mjs513

Thanks @mjs513,
Will retest the one I have, maybe with some other external SD reader. Like maybe one on an Adafruit display board... The one I was using was a sparkfun one with level shifters, which should work for 3.3 or 5v, but who knows, maybe something maybe sensitive on these type cards with signals coming and going through TXB104 shifters.

Note: I just ordered one of each also... Although for the one that supposedly matches the one I already had (cheaper one), I upped it to the 64mb version.
Sort of interesting that I retried the one on the Sparkfun board and it failed again. Several other MicroSds worked. This is a T4

I then hooked up Adafruit ST7789 display to second T4 and hooked up the SDCS pin from the display to pin 4... And the Samsung EVO SDHC worked... Will be interesting to see when the two other arrive.

anthonysavatar
11-09-2020, 04:27 AM
Hi all! The 1.54b4 build worked great for us. We used it for the Pigweed remoticon workshop today: https://hackaday.io/project/175167-remoticon-give-pigweed-a-whirl

Step by step guide is here: https://pigweed.googlesource.com/pigweed/sample_project/+/refs/heads/master/workshop/README.md

Thank you for all the hard work getting 1.54 out the door! I'll update to stable when y'all release it.

mborgerson
11-10-2020, 08:50 PM
A question about the SD wrapper for SDFat: Will I be able to use the sync() function if I use only SD.h? I've found that the sync() function is very helpful in long data logging sessions for two reasons: 1: it updates the directory so you can minimize data loss if the logger loses power in the middle of a logging session, 2: calling sync() puts the SD card into idle mode which significantly reduces power consumption. https://forum.pjrc.com/threads/59526-Low-Power-logging-and-sync()-in-EXFat

WMXZ
11-11-2020, 06:47 AM
A question about the SD wrapper for SDFat: Will I be able to use the sync() function if I use only SD.h?

Use SD.flush(), which is calling sdfat's sync().
Or use SD.sdfs.sync();
SD.sdfs is declared public , so you can use sdfat functions directly.

KurtE
11-11-2020, 04:59 PM
Quick update: I went ahead and ordered a couple more of the Samsung EVO Select cards and will try them out again. In particular will be interesting to see if the two new ones act different than the ones I ordered maybe two years ago in the top of the picture. The 3 32gb ones are marked in small letters under the EVO Select as HC... The 64 is marked XC

22393

Again no idea how different they are both will write up to 20mb/s the HC one is marked Read up to 95 and the XC up to 100MB....

KurtE
11-11-2020, 05:20 PM
Quick update: The Sparkfun adapter appears to be able to work with both of these... So for the heck of it, I am right now using SDFormatter on one of the old ones to completely erase and overwrite it and will see if it likes it then... It is taking awhile to do the full overwrite.

KurtE
11-11-2020, 05:57 PM
Ok I did a complete low level reformat of one of the older ones, which created one Fat32 drive... I tried it again on the Sparkfun SPI adapter Pin 4 and it failed to initialize again. Tried it on different T4 with Adafruit display and SDCard connected again on Pin 4 and it reads the SD... Maybe I should go ping this to Sparkfun!

Edit: Emailed Sparkfun... Also including photo of back showing the two old ones and the new one.
22396
The one on left is new one.. Same top number but different second number... Probably some hardware revision happened.

LitterBug
11-11-2020, 08:45 PM
I don't have any of the EVO Selects, but I have been doing my own playing and bench testing of cards on a 4.1, 1-54B4, with the Built in reader and FIFO_SDIO. All of these cards have worked. I can even read two "bricked" cards that nothing else seems to want to. (marked with X in bottom of pic. Most of the cards write in the 12-18MB/s range, and almost all of them will read around 22.8MB/s. The old Samsung pro writes faster than the newer one. (20 vs 17 MB/s). All cards tested were empty and freshly formatted with SDCardFormmatterV5.
22398

These are my fastest cards. these will all write roughly 20.8MB/s, and read at roughly 22.8MB/s. The most consistent between all the tests has been the SanDiskExtreme 16GB U3. The Fastest is one of my older 32GB EVO cards that writes @ 21.3 and reads @ 23.0
22399

Samsung EVO 32 U1

size,write,read
bytes,KB/sec,KB/sec
512,21288.45,22891.92
1024,21285.16,22923.83
2048,21332.41,22983.87
4096,21374.75,23011.87
8192,21386.53,23026.59
16384,21257.38,23056.84
32768,21392.58,23034.99




EDIT:
Interesting. Reformatted the SanDisk Extreme 16GB to ExFat, and both the read and write performance went up



size,write,read
bytes,KB/sec,KB/sec
512,22460.24,22897.86
1024,22106.87,22930.97
2048,22570.83,22979.84
4096,22183.46,23007.13
8192,22612.27,23020.65
16384,22181.35,23027.03
32768,22622.08,23030.95

LitterBug
11-12-2020, 01:50 AM
These numbers suggest we are using High Speed Mode (25 MB/s) 50mhz-4bit clocking and not UHS clocking. Wonder if the hardware can handle at least the slower 100Mhz UHS clock and 50MB/s. I won't beg for the 208MHz rate of 104MB/s...

LB

The CPU Spec sheet looks promising for even the higher UHS-1 spec
22405

I've dug through the code and don't see any support for UHS-1. Would probably take a bit of work to do more than a hack job of it. Probably be a good "Feature Request'

MichaelMeissner
11-12-2020, 03:22 AM
From what I've read, to do UHS-1, you would need to drop the voltage from 3.3v to 1.8 on each of the 4 data pins and VDD. UHS-2 requires 0.4v and it has double the pins:

https://en.wikipedia.org/wiki/SD_card

LitterBug
11-12-2020, 04:40 AM
From what I'm reading in the CPU specs and manual, That can be done using the SD/SDIO interfaces. Data sheets are here https://www.pjrc.com/teensy/datasheets.html
High level DataSheet: https://www.pjrc.com/teensy/IMXRT1060CEC_rev0_1.pdf
Deep dive Manual: https://www.pjrc.com/teensy/IMXRT1060RM_rev2.pdf

From page 1376 of the processor manual


24.3 eMMC/eSD/SDIO
This chip has two Ultra Secured Digital Host Controller (uSDHC) modules for SD/
eMMC interface. It provides the interface between the host system and the SD/
SDIO/MMC cards.
The key features include:
• Support SD/SDIO standard, up to version 3.0
• Support MMC standard, up to version 4.5
• Support 3.3V and 1.8V operation, but do not support 1.2V operation.
• Supports 1-bit / 4-bit SD and SDIO modes, 1-bit / 4-bit / 8-bit MMC modes
• Up to 800 Mbps of data transfer for SDIO cards using 4 parallel data lines in
SDR mode
• Up to 400 Mbps of data transfer for SDIO card using 4 parallel data lines in
DDR mode
• Up to 800 Mbps of data transfer for SDXC cards using 4 parallel data lines in
SDR mode
• Up to 400 Mbps of data transfer for SDXC card using 4 parallel data lines in
DDR mode
• Up to 1600 Mbps of data transfer for MMC cards using 8 parallel data lines in
SDR mode
• Up to 800 Mbps of data transfer for MMC cards using 8 parallel data lines in
DDR mode
eMMC/eSD/SDIO

i.MX RT1060 Processor Reference Manual, Rev. 2, 12/2019
1376 NXP Semiconductor

EDIT: So full UHS-1 support "should" be possible on the T4.0 and T4.1 as long as the SD card is connected to one of the two SDIO interfaces.

EDIT2: There is also a whole section on setting up SD/SDIO boot with UHS-1 support....

EDIT3: On the T4.0, you need to use the SD Card (4 bit SDIO) flats on the bottom of the board and an SD card Connector/module with NO level converters.
https://www.digikey.com/en/products/detail/molex,-llc/5031821852/5823232 or https://www.digikey.com/en/products/detail/molex/0475710001/3262277
22406

MichaelMeissner
11-12-2020, 06:42 AM
Cool, thanks for the update.

defragster
11-13-2020, 07:15 PM
New TeamGroup 256 GB SD card. From NewEgg : newegg.com/team-128gb-microsdxc (https://www.newegg.com/team-128gb-microsdxc/p/N82E16820331378?Item=N82E16820331378)
22436

SD\cardinfo.ino gives:

Initializing SD card...Wiring is correct and a card is present.

Card type: SDHC

Volume type is FAT64

Volume size (Kbytes): 250281984
Volume size (Mbytes): 244416


...\teensy\avr\libraries\SdFat-beta\examples\SdInfo\SdInfo.ino gives more info and works:

type any character to start
init time: 8 ms

Card type: SDXC

Manufacturer ID: 0X12
OEM ID: 4V
Product: SD
Version: 1.0
Serial number: 0X6B13A014
Manufacturing date: 9/2014

cardSize: 256355.86 MB (MB = 1,000,000 bytes)
flashEraseSize: 128 blocks
eraseSingleBlock: true

OCR: 0XC0FF8000

SD Partition Table
part,boot,bgnCHS[3],type,endCHS[3],start,length
1,0X0,0X14,0X11,0X4,0X7,0XFE,0XFF,0XFF,65536,50062 9504
2,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0,0
3,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0,0
4,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0,0

Scanning FAT, please wait.

Volume is exFAT
sectorsPerCluster: 512
clusterCount: 977664
freeClusterCount: 977661
fatStartSector: 98304
dataStartSector: 131072


This sketch won't compile as installed with 'SD_FAT_TYPE = 0' : T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\SdFat-beta\examples\bench\bench.ino

"T:\\TEMP\\arduino_build_bench.ino\\sketch\\bench.i no.cpp.o"
T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\SdFat-beta\examples\bench\bench.ino:69:1: error: 'File' does not name a type
File file;
^
T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\SdFat-beta\examples\bench\bench.ino: In function 'void loop()':
T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\SdFat-beta\examples\bench\bench.ino:167:8: error: 'file' was not declared in this scope
if (!file.open("bench.dat", O_RDWR | O_CREAT | O_TRUNC)) {
^
T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\SdFat-beta\examples\bench\bench.ino:190:5: error: 'file' was not declared in this scope
file.truncate(0);
^
T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\SdFat-beta\examples\bench\bench.ino:233:5: error: 'file' was not declared in this scope
file.rewind();
^
T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\SdFat-beta\examples\bench\bench.ino:269:3: error: 'file' was not declared in this scope
file.close();
^
Using library SdFat-beta at version 2.0.0-beta.8 in folder: T:\arduino-1.8.13_t54\hardware\teensy\avr\libraries\SdFat-beta

Changing this to #3 works for this disk and compiles:

// SD_FAT_TYPE = 0 for SdFat/File as defined in SdFatConfig.h,
// 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
#define SD_FAT_TYPE 0

Read and write speed looks GOOD at 21 MB/s Write and 22 MB/s Read:

Type any character to start
FreeStack: 441472
Type is exFAT
Card size: 256.36 GB (GB = 1E9 bytes)

Manufacturer ID: 0X12
OEM ID: 4V
Product: SD
Version: 1.0
Serial number: 0X6B13A014
Manufacturing date: 9/2014

FILE_SIZE_MB = 5
BUF_SIZE = 512 bytes
Starting write test, please wait.

write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
21095.70,47,22,23
21007.06,47,23,23

Starting read test, please wait.

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
22725.82,23,22,22
22829.59,23,22,22

Done

Then ran ...\teensy\avr\libraries\SdFat-beta\examples\ExFatFormatter\ExFatFormatter.ino
That worked and above bench.ino gave similar results

mborgerson
11-14-2020, 07:39 PM
Is there any chance of making the text entry box and "Send" button at the bottom of the Serial Plotter actually send data to the Teensy? The plotter is occasionally useful when I want to view an ADC input waveform without having to send the data to the PC and using a separate plotting program. It would be nice to be able to start and stop the Teensy output with command characters sent from the plotter instead of having to switch back to the Serial Monitor.

Is this something outside the control of PJRC, or just a low-priority task?

mborgerson
11-14-2020, 07:50 PM
I think I just answered my own question. Recalling the difficulties with double-spaced cut and pasted Serial Monitor output that disappeared when you choose the port from "serial ports" instead of "Teensy Ports", I switched to the "Serial Port" and lo and behold, text from the text box gets sent to the Teensy!

defragster
11-14-2020, 08:05 PM
I think I just answered my own question. Recalling the difficulties with double-spaced cut and pasted Serial Monitor output that disappeared when you choose the port from "serial ports" instead of "Teensy Ports", I switched to the "Serial Port" and lo and behold, text from the text box gets sent to the Teensy!

Good find that IDE SerMon Serial does that. Was going to suggest use TyCommander with DualSerial - let IDE Teensy SerMon OWN and do plotting and then the 2nd Serial in TyComm would allow command and also any debug spew.

PaulStoffregen
11-15-2020, 03:56 AM
Here is my latest attempt to fix the double spaced lines on copy to clipboard from the serial monitor on Windows.

Extract this zip file and copy teensy_serialmon.exe to {Arduino}/hardware/tools, replacing the existing file. Windows probably won't let you replace it if the serial monitor is open. The default Arduino location is C:\Program Files (x86)\Arduino.

I ran a quick test here on Windows 10 where it seems to work. Does this solve the double spaced lines on your Windows machine?

defragster
11-15-2020, 05:59 AM
@Paul - that works here on Windows 10:


Blink again - w/println - before bare println

Blink again - w/println - after bare println - end loop.
Blink again - w/println - before bare println

Blink again - w/println - after bare println - end loop.
Blink again - w/println - before bare println

Blink again - w/println - after bare println - end loop.


<EDIT> :: This is NOT new behavior - just put back another copy of that file from another 1.54 beta install - and it has the same ODD behavior

Note: Text select to copy does odd shift of selected text - rather than inverse text color on highlight and stay steady - some lines toggle inverted text color to not visible?
Movie too big - here are three frames ...
224442244522446

mjs513
11-15-2020, 01:08 PM
@Paul
Seems to work for me here as well. This is a direct copy past from the serial monitor:


LittleFS Test
flash begin
Flash ID: EF 70 18
Flash size is 16.00 Mbyte
attemping to mount existing media
success
started
printDirectory
--------------
FILE PRINTOUTPUT1.txt 628
FILE PRINTOUTPUT2.txt 630
FILE file1.txt 32
FILE file10.txt 16
FILE file2.txt 32
FILE file20.txt 16
FILE file3.txt 32
FILE file30.txt 16
FILE mtpindex.dat 0
DIR structuredData /
FILE logger.txt 480
DIR test1 /
FILE file1.txt 16
DIR test2 /
FILE file2.txt 16
DIR test3 /
FILE file3.txt 16

Disk Usuage:
Bytes Used: 53248, Bytes Total:16777216
Before always extra lines. So looks good from my test.

KurtE
11-15-2020, 01:35 PM
Here is a longer one:



OV7670 Camera Test 3 Compiled on Nov 15 2020 05:31:56
EXT Memory size: 8
Read Register(Write): 11 error: 2
I2C Write: reg: 0x11(CLKRC), value = 0x41
I2C Write: reg: 0x6b(DBLV), value = 0x4a
cam clock 12.00 with pll=1 and div=1
...
I2C Write: reg: 0x19(VSTART), value = 0x01
I2C Write: reg: 0x1a(VSTOP), value = 0x79
I2C Write: reg: 0x03(VREF), value = 0x3f
::begin 0 255 255 255
ILI9488_t3::begin - End
After cameraBegin(end setup)
s - Show Information
c - Print CSI Registers
r - Show Camera registers
f - Show a frame
x - Send Raw (Processing Sketch)
d - Save Image to SD Card
t - send Image to ILI9341
v - Send continuous images to ILI9341
Command character received: c
==== CSI ====
CSI_CSICR1: 401B0912
CSI_CSICR2: C0000000
CSI_CSICR3: 33C1020
CSI_CSISTATFIFO: 0
CSI_CSIRFIFO: 630E5AEE
CSI_CSIRXCNT: 9600
CSI_CSISR: 84204001
CSI_CSIDMASA_STATFIFO: 0
CSI_CSIDMATS_STATFIFO: 0
CSI_CSIDMASA_FB1: 70000000
CSI_CSIDMASA_FB2: 70096000
CSI_CSIFBUF_PARA: 0
CSI_CSIIMAG_PARA: 50001E0
CSI_CSICR18: 800AD210
CSI_CSICR19: 10
CSI_CSIRFIFO: 73907390
Command character received:
Command character received:

Command character received: r
00(GAIN):FE
01(BLUE):58
02(RED):40
03(VREF):FF
04(COM1):01
05(BAVE):7F
06(GbAVE):87
07(AECHH):40
08(RAVE):87
09(COM2):01
0A(PID):76
0B(VER):73
0C(COM3):00
0D(COM4):40
0E(COM5):61
0F(COM6):4B
10(AECH):7F
11(CLKRC):80
12(COM7):04
13(COM8):C7
14(COM9):6A
15(COM10):22
16(*RSVD*):02
17(HSTART):16
18(HSTOP):04
19(VSTART):01
1A(VSTOP):79
1B(PSHFT):00
1C(MIDH):7F
1D(MIDL):A2
1E(MVFP):07
1F(LAEC):00
20(ADCCTR0):04
21(ADCCTR1):02
22(ADCCTR2):91
23(ADCCTR3):00
24(AEW):95
25(AEB):33
26(VPT):E3
27(BBIAS):80
28(GbBIAS):80
29(*RSVD*):07
2A(EXHCH):00
2B(EXHCL):00
2C(RBIAS):80
2D(ADVFL):00
2E(ADVFH):00
2F(YAVE):3E
30(HSYST):00
31(HSYEN):00
32(HREF):B6
33(CHLF):0B
34(ARBLM):11
35(*RSVD*):0B
36(*RSVD*):00
37(ADC):1D
38(ACOM):71
39(OFON):2A
3A(TSLB):0D
3B(COM11):12
3C(COM12):78
3D(COM13):40
3E(COM14):18
3F(EDGE):00
40(COM15):D0
41(COM16):08
42(COM17):00
43(AWBC1):0A
44(AWBC2):F0
45(AWBC3):34
46(AWBC4):58
47(AWBC5):28
48(AWBC6):3A
49(*RSVD*):00
4A(*RSVD*):00
4B(REG4B):09
4C(DNSTH):00
4D(DM_POS):40
4E(*RSVD*):20
4F(MTX1):B3
50(MTX2):B3
51(MTX3):00
52(MTX4):3D
53(MTX5):A7
54(MTX6):E4
55(BRIGHT):32
56(CONTRAS):5C
57(CONTRAS_CENTER):80
58(MTXS):9E
59(AWBC7):88
5A(AWBC8):88
5B(AWBC9):44
5C(AWBC10):67
5D(AWBC11):49
5E(AWBC12):0E
5F(B_LMT):F0
60(R_LMT):F0
61(G_LMT):F0
62(LCC1):00
63(LCC2):00
64(LCC3):50
65(LCC4):30
66(LCC5):00
67(MANU):80
68(MANV):80
69(GFIX):00
6A(GGAIN):40
6B(DBLV):0A
6C(AWBCTR3):0A
6D(AWBCTR2):55
6E(AWBCTR1):11
6F(AWBCTR0):9E
70(SCALING_XSC):3A
71(SCALING_YSC):35
72(SCALING_DCWCTR):00
73(SCALING_PCLK_DIV):F0
74(REG74):10
75(REG75):05
76(REG76):E1
77(REG77):01
78(*RSVD*):04
79(*RSVD*):26
7A(SLOP):20
7B(GAMA1):10
7C(GAMA2):1E
7D(GAMA3):35
7E(GAMA4):5A
7F(GAMA5):69
80(GAMA6):76
81(GAMA7):80
82(GAMA8):88
83(GAMA9):8F
84(GAMA10):96
85(GAMA11):A3
86(GAMA12):AF
87(GAMA13):C4
88(GAMA14):D7
89(GAMA15):E8
8A(*RSVD*):00
8B(*RSVD*):00
8C(?RGB444):00
8D(*RSVD*):4F
8E(*RSVD*):00
8F(*RSVD*):00
90(*RSVD*):00
91(*RSVD*):00
92(DM_LNL):00
93(DM_LNH):00
94(LCC6):50
95(LCC7):50
96(*RSVD*):00
97(*RSVD*):30
98(*RSVD*):20
99(*RSVD*):30
9A(*RSVD*):84
9B(*RSVD*):29
9C(*RSVD*):03
9D(BD50ST):4C
9E(BD60ST):3F
9F(HAECC1):78
A0(HAECC2):68
A1(DSPC3):03
A2(SCALING_PCLK_DELAY):01
A3(*RSVD*):01
A4(NT_CTRL):82
A5(AECGMAX):05
A6(LPH):D8
A7(UPL):D8
A8(TPL):F0
A9(TPH):90
AA(NALG):94
AB(*RSVD*):07
AC(STR-OPT):00
AD(STR_R):80
AE(STR_G):80
AF(STR_B):80
B0(*RSVD*):84
B1(ABLC1):0C
B2(*RSVD*):0E
B3(THL_ST):82
B4(*RSVD*):00
B5(THL_DLT):04
B6(*RSVD*):00
B7(*RSVD*):66
B8(*RSVD*):0A
B9(*RSVD*):06
BA(*RSVD*):00
BB(*RSVD*):00
BC(*RSVD*):00
BD(*RSVD*):00
BE(AD-CHB):27
BF(AD-CHR):20
C0(AD-CHGb):39
C1(AD-CHRr):35
C2(*RSVD*):00
C3(*RSVD*):00
C4(*RSVD*):00
C5(*RSVD*):00
C6(*RSVD*):00
C7(*RSVD*):00
C8(*RSVD*):A0
C9(SATCTR):67
Command character received:
Command character received:



From this test which has combination of print, println, printf, looks like it is working! :D

LitterBug
11-20-2020, 01:42 PM
Just a quick update on my uSDHC / UHS-I / SDR104 findings. People over on the NXP forums have in fact run these iMXRT106x chips successfully at full UHS-1 specifications. There is a register that needs to be flipped that handles the voltage change from 3.3V to 1.8V.

Some of my chicken scratch notes from the iMXRT1060 manual outlining the process:

26.6.4 Switch Function
A switch command shall be issued by the Host Driver to enable new features added to the
SD/MMC spec. SD/MMC cards can transfer data at bus widths other than 1-bit. Different
speed mode are also defined. To enable these features, a switch command shall be issued
by the Host Driver.
For SDIO cards, the high speed mode/DDR50/SDR50/SDR104 are enabled by writing
the EHS bit in the CCCR register after the SHS bit is confirmed. For SD cards, the high
speed mode/DDR50/SDR50/SDR104 are queried and enabled by a CMD6 (with the
mnemonic symbol as SWITCH_FUNC). For MMC cards , the high speed mode/HS200
are queried by a CMD8 and enabled by a CMD6 (with the mnemonic symbol as
SWITCH).
The SDR4-bit, SDR8-bit ,DDR4-bit and DDR8-bit width of the MMC is also enabled by
the SWITCH command, but with a different argument.
Initialization/Application of uSDHC
i.MX RT1060 Processor Reference Manual, Rev. 2, 12/2019
1538 NXP Semiconduct



26.6.4.2 Query, Enable and Disable SD High Speed Mode/SDR50/
SDR104/DDR50
enable_sd_speed_mode(void)
{
set BLKCNT field to 1 (block), set BLKSIZE field to 64 (bytes);
send CMD6, with argument 0xFFFFFx and read 64 bytes of data accompanying the R1 response;
(high speed mode,x=1; SDR50,x=2; SDR104,x=3; DDR50,x=4;)
wait data transfer done bit is set;
check if the bit x of received 512 bits is set;
if (bit 401 is '0') report the SD card does not support high speed mode and return;
if (bit 402 is '0') report the SD card does not support SDR50 mode and return;
if (bit 403 is '0') report the SD card does not support SDR104 mode and return;
if (bit 404 is '0') report the SD card does not support DDR50 mode and return;
send CMD6, with argument 0x80FFFFFx and read 64 bytes of data accompanying the R1 response;
(high speed mode,x=1; SDR50,x=2; SDR104 x=3; DDR50 x=4;)
check if the bit field 379~376 is 0xF;
if (the bit field is 0xF) report the function switch failed and return;
change clock divisor value or configure the system clock feeding into uSDHC to generate the
card_clk of around 50MHz for high speed mode, 100Mhz for SDR50, 200Mhz for SDR104, 50Mhz for
DDR50;
(data transactions like normal peers)
}
disable_sd_speed_mode(void)
{
set BLKCNT field to 1 (block), set BLKSIZE field to 64 (bytes);
send CMD6, with argument 0x80FFFFF0 and read 64 bytes of data accompanying the R1 response;
check if the bit field 379~376 is 0xF;
Chapter 26 Ultra Secured Digital Host Controller (uSDHC)
i.MX RT1060 Processor Reference Manual, Rev. 2, 12/2019
NXP Semiconductors 1539
if (the bit field is 0xF) report the function switch failed and return;
change clock divisor value or configure the system clock feeding into uSDHC to generate the
card_clk of the desired value below 25MHz;
(data transactions like normal peers)
}

vjmuzik
11-21-2020, 10:46 PM
Just a quick update on my uSDHC / UHS-I / SDR104 findings. People over on the NXP forums have in fact run these iMXRT106x chips successfully at full UHS-1 specifications. There is a register that needs to be flipped that handles the voltage change from 3.3V to 1.8V.

Some of my chicken scratch notes from the iMXRT1060 manual outlining the process:

26.6.4 Switch Function
A switch command shall be issued by the Host Driver to enable new features added to the
SD/MMC spec. SD/MMC cards can transfer data at bus widths other than 1-bit. Different
speed mode are also defined. To enable these features, a switch command shall be issued
by the Host Driver.
For SDIO cards, the high speed mode/DDR50/SDR50/SDR104 are enabled by writing
the EHS bit in the CCCR register after the SHS bit is confirmed. For SD cards, the high
speed mode/DDR50/SDR50/SDR104 are queried and enabled by a CMD6 (with the
mnemonic symbol as SWITCH_FUNC). For MMC cards , the high speed mode/HS200
are queried by a CMD8 and enabled by a CMD6 (with the mnemonic symbol as
SWITCH).
The SDR4-bit, SDR8-bit ,DDR4-bit and DDR8-bit width of the MMC is also enabled by
the SWITCH command, but with a different argument.
Initialization/Application of uSDHC
i.MX RT1060 Processor Reference Manual, Rev. 2, 12/2019
1538 NXP Semiconduct



26.6.4.2 Query, Enable and Disable SD High Speed Mode/SDR50/
SDR104/DDR50
enable_sd_speed_mode(void)
{
set BLKCNT field to 1 (block), set BLKSIZE field to 64 (bytes);
send CMD6, with argument 0xFFFFFx and read 64 bytes of data accompanying the R1 response;
(high speed mode,x=1; SDR50,x=2; SDR104,x=3; DDR50,x=4;)
wait data transfer done bit is set;
check if the bit x of received 512 bits is set;
if (bit 401 is '0') report the SD card does not support high speed mode and return;
if (bit 402 is '0') report the SD card does not support SDR50 mode and return;
if (bit 403 is '0') report the SD card does not support SDR104 mode and return;
if (bit 404 is '0') report the SD card does not support DDR50 mode and return;
send CMD6, with argument 0x80FFFFFx and read 64 bytes of data accompanying the R1 response;
(high speed mode,x=1; SDR50,x=2; SDR104 x=3; DDR50 x=4;)
check if the bit field 379~376 is 0xF;
if (the bit field is 0xF) report the function switch failed and return;
change clock divisor value or configure the system clock feeding into uSDHC to generate the
card_clk of around 50MHz for high speed mode, 100Mhz for SDR50, 200Mhz for SDR104, 50Mhz for
DDR50;
(data transactions like normal peers)
}
disable_sd_speed_mode(void)
{
set BLKCNT field to 1 (block), set BLKSIZE field to 64 (bytes);
send CMD6, with argument 0x80FFFFF0 and read 64 bytes of data accompanying the R1 response;
check if the bit field 379~376 is 0xF;
Chapter 26 Ultra Secured Digital Host Controller (uSDHC)
i.MX RT1060 Processor Reference Manual, Rev. 2, 12/2019
NXP Semiconductors 1539
if (the bit field is 0xF) report the function switch failed and return;
change clock divisor value or configure the system clock feeding into uSDHC to generate the
card_clk of the desired value below 25MHz;
(data transactions like normal peers)
}

I'm pretty sure I remember talks of this before and the problem had to do with it being hardwired at 3.3v and the pin that is supposed to make the change to 1.8v wasn't exposed anywhere.

LitterBug
11-21-2020, 10:50 PM
I'm pretty sure I remember talks of this before and the problem had to do with it being hardwired at 3.3v and the pin that is supposed to make the change to 1.8v wasn't exposed anywhere.

It is handled internal to the CPU. no external hardware is necissary.

vjmuzik
11-22-2020, 12:35 AM
I thought the SD card needs to be powered from 1.8v as well, it is currently hardwired to 3.3v with no way to change it and from what I remember there was a pin on the processor that would toggle when it is is supposed to go into 1.8v mode so that you can change the voltage of the SD card using that signal.

LitterBug
11-22-2020, 02:03 AM
I thought the SD card needs to be powered from 1.8v as well, it is currently hardwired to 3.3v with no way to change it and from what I remember there was a pin on the processor that would toggle when it is is supposed to go into 1.8v mode so that you can change the voltage of the SD card using that signal.

The NXP reference board has the SD VDD wired the same to 3.3v, and pretty much the rest of the SD slot for that matter. No level shifter between the CPU and SDcard.
22565
22564

The SDCARD SDIO reference says the supply voltage should be 2.7-3.6V
The "signaling voltage" needs to switch to 1.8V for the SDR### modes, not the Supply voltage.

LB

EDIT: The hidden signal: SD0_VSELECT is an internal register for the internal IOMUXC. It would not show up on an external pin....

vjmuzik
11-22-2020, 02:50 AM
I see now it's not the SD cards power that needs to change it's the NVCC_SD voltage that has to change, which based on the Teensy 4 schematic is hardwired to 3.3v so currently we can't do anything about that. As per the data sheet the signaling voltage is derived from NVCC_SD which has to be 1.8v to use SDR104/SDR50 speeds.

vjmuzik
11-22-2020, 02:55 AM
The pins for VSELECT can be found in the reference manual, which does show the external pins that it maps to, for SD0 it can be one of these 4 pins here:


USDHC1_VSELECT
GPIO_EMC_41 ALT6
GPIO_AD_B1_01 ALT6
GPIO_B1_14 ALT6
GPIO_EMC_34 ALT2

LitterBug
11-22-2020, 03:46 AM
Those are internal pins on the IOMUXC. Not exposed pins. The voltage selection and change happens inside the CPU via a configuration register.

22567

vjmuzik
11-22-2020, 04:19 AM
They are very much exposed pins and not just internal though the only one we have exposed is AD_B1_01 which is pin 18 on the Teensy 4.1. Like I said earlier that pin would be responsible for changing the voltage going in to NVCC_SD to 1.8v by triggering external circuitry. But since it’s hardwired and there is no hardware in place it can’t currently be done.

LitterBug
11-22-2020, 04:33 AM
The IOMUX is an internal component of the CPU. it is NOT exposed. VSELECT gets set by writing to CMD6. The IOMUX does the the voltage change internally.

For SDIO cards, the high speed mode/DDR50/SDR50/SDR104 are enabled by writing
the EHS bit in the CCCR register after the SHS bit is confirmed. For SD cards, the high
speed mode/DDR50/SDR50/SDR104 are queried and enabled by a CMD6 (with the
mnemonic symbol as SWITCH_FUNC).

This all happens inside the CPU and does not require any additional hardware. You are making it harder than it is.

vjmuzik
11-22-2020, 04:41 AM
It's not rocket science, the reference manual tells you you need external circuitry, so you need external circuitry:
22568

LitterBug
11-22-2020, 04:45 AM
It's not rocket science, the reference manual tells you you need external circuitry, so you need external circuitry:
22568

Which is an internal signal handled by the IOMUX.

vjmuzik
11-22-2020, 04:54 AM
The IOMUX is responsible for routing internal registers to external signals, just turning on VSELECT will not change to 1.8v mode. VSELECT for SD0 can be routed to one of four pins through the IOMUX, you then need external circuitry on that pin that changes NVCC_SD from 3.3v to 1.8v.

LitterBug
11-22-2020, 06:15 AM
I think I see the error in my ways after a lot more digging.

I think there is an easy workaround whether or not the vselect signal is output on the intended pin or not. There is nothing stopping someone from using a different pin for VSELECT in the SDIO/SDFat routines. The Teensy 4.0 does not have a SDcard holder mounted by default. Should be easy enough to set up a level shifter. The 4.1 would need to have the card holder removed or if you are good at soldering, you may be able to get wires on the pads with the existing holder in place. I have also seen microSD card breakouts.
22569

The logic is still needed in SDIO/SDFat for checking the card for it's capabilities, setting whatever VSELECT pin is used in addition to setting the CMD6 register, and then setting the clocking.

LB

LitterBug
11-22-2020, 03:11 PM
Sorry if I was a little thick headed, but I have seen the light. :)