Did not try SPDIF (have no SPDIF device), It was only a test to see if I can get SAI2 working. SPDIF clock is one of the inputs. In the end, I found the error and did not need it.@WMXZ, yes, I have your code here I see some lines for SPDIF - is that already working, too?
As for RPI? Wondering if the new RPI3+ boards are exactly the same as the RPI0? ones.
The 40 pin header is identical on all versions of the P that use iti; what is new on the Pi3 B+ is the power header to connect the POE (Power over Ethernet) HAT.
Found why I'm getting the error. All the #includes for the USB devices like the joystick are commented out in WPogram.h. When I uncomment them they lead me to all the #if 0's that are in the core. Just thought I would let you know.Did a quick scan after prior - the descriptors and the code are spread different from the 'in progress' core code ... global search on T3 tree shows undef as well - there are lots of crossed/built_on dependencies - that message isn't real specific - I'm not sure where I'd begin.
Only look I ever on descriptors was somebody wanted to change USB types during runtime startup and I found a place for that he got working ...
It could be flag passing negating something in one place that is needed?
Found why I'm getting the error. All the #includes for the USB devices like the joystick are commented out in WPogram.h. When I uncomment them they lead me to all the #if 0's that are in the core. Just thought I would let you know.
Mike - Teensy View is a Teensy PCB sized and pinned 128x32 OLED from SparkFun - pretty cool - never found need to make one permanent - but I got two
Kurt - Any alternatives it can offer is good - pretty sure the 1062 is on order and pending delivery in some quantity. I went looking I thought it was second SPI that went missing - even 7.5 would be better than nothing or most alternative busses for most uses.
Actually can probably run faster.
...
Your prior comment suggested you hadn't gotten to tweaking yet, assumed you'd get there Given CAN FD is likely taking 2nd SPI w/1062 it is very good the FlexIO can function - and the 1062 adds more of those it seems.
Depends where Paul decides to put them. Right now you have CAN1 and CAN2. You could always substitute CANFD for CAN1. Then put CAN1 back on future T4.x's
Tim - gave up a usb - started reading the USB chapter and gave me a giant headache. Not sure how Paul sorted that out. Well, maybe not gave up but...
I think the first models had a 26 pin header. And that's good, because we don't have enough regular pins..
Giving up CAN1 would be tough - not because of CAN1, but due to the other stuff shared on its pins.
Pins 11 & 13 are shared with SPI, so those are untouchable.
Pins 22 & 23 are more likely candidates. But 23 is shared with I2S1 MCLK.
On my list of stuff to investigate is whether MCLK can be shared between two different I2S ports. If so, that might open up the possibility to reassign pin 23.
But we also need analog input on pin 23. Another subtle feature of the assignments we currently have for pins 14-23 is all 10 can be accessed by either ADC. Most of the alternates mux to only 1 of the ADCs. Not a critical feature, but having the ability for all the main analog inputs to use either physical ADC inside the chip does give some really interesting possibilities for the future....
Which hardware uses CANFD? Never worked with CAN. It's used in cars - are there more uses? Seems interesting..
Edit: The obvious solution is to add 2-3 rows of pins..
But a T4 with more PINs would of course compete with the Teensy 3.5 and 3.6. Not good for business.
Suppose that is why I had not seen CAN1 as an exchange for CANFD - nice joke Mike
2-4 more pins would be handy - might even open up room for better SD card mounting -
If I got the orientation right, the actual layout has still room for improvements. actual location id too far in the middle to allow direct soldering of a uSD card (the decoupling capacitors are interfering). The (uSD) pin spacing (1.1 mm) on the other hand is not compatible with any header (I soldered a 1 mm header by twisting outside header pins). Unfortunately Paul has overseen my earlier question (https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=195131&viewfull=1#post195131) on intended uSD connection.2-4 more pins would be handy - might even open up room for better SD card mounting -
___ ASSERT FAILED ___ FILE >> T:\tCode\libraries\debug_tt\examples\Asserts\Asserts.ino
___ in function >> setup() at LINE# >> 37
Expression >> isfinite( x )
>>>> ABORT >>>> ASSERT FAILED
>>>> debug_fault >>>> debug_fault >>>> TYPE:ASSERT
Debug Info:
3 => 470 0x1D6 [L#33_C#2 _<< last func::setup
7 => 469603 0x72A63 [L#30_C#1
___ ASSERT FAILED ___ 'y' to continue ...
'd' to call Debug_Dump()
'b' Teensy Bootloader
'r' Restart Teensy
'z' Zero Debug logs
Raw SerialFlash Hardware Test
SPI MISO: 12 MOSI: 11, SCK: 13
Read Chip Identification:
JEDEC ID: EF 40 18
Part Nummber: W25Q128FV
Memory Size: 16777216 bytes
Block Size: 65536 bytes
Reading Chip...
Writing 32 signatures
Double Checking All Signatures:
all 8192 signatures read ok
Checking Signature Pairs
all 4095 signature pairs read ok
Checking Read-While-Write (Program Suspend)
write 256 bytes at 512
write time was 390 microseconds.
read-while-writing: 00 00 00 00 15 F5 95 4B
test passed, good read while writing
Checking Read-While-Erase (Erase Suspend)
erase time was 276770 microseconds.
erase correctly erased 65536 bytes
read-while-erasing: 00 00 00 00 15 F5 95 4B
test passed, good read while erasing
All Tests Passed :-)
Test data was written to your chip. You must run
EraseEverything before using this chip for files.
----------------------------------------------------
SPI MISO: 12 MOSI: 11, SCK: 13
Flash Memory has 16777216 bytes.
Erasing ALL Flash Memory:
estimated wait: 40 seconds.
Yes, full chip erase is SLOW!
............................................................
..
Erase completed
actual wait: 62 seconds.
@luni,
do you want to test this (?): https://github.com/PaulStoffregen/cores/pull/347
- no loop
- check registers only if channel is in use
together with the other changes, it'll be as fast as 3.6 - don't know exactly because I have so many other changes in my installation..
#include "arduino.h"
IntervalTimer t1, t2, t3, t4;
void test() // dummyfunction
{
//digitalWriteFast(0, !digitalReadFast(0));
}
void test2() // dummyfunction
{
//digitalWriteFast(0, !digitalReadFast(0));
}
void test3() // dummyfunction
{
//digitalWriteFast(0, !digitalReadFast(0));
}
void test4() // dummyfunction
{
//digitalWriteFast(0, !digitalReadFast(0));
}
volatile int dummy;
constexpr unsigned loops = 100000;
void setup()
{
while (!Serial)
;
// required for T3.6
ARM_DEMCR |= ARM_DEMCR_TRCENA;
ARM_DWT_CTRL |= ARM_DWT_CTRL_CYCCNTENA;
// Measure cycles required for loop without any interrupts
noInterrupts();
uint32_t start = ARM_DWT_CYCCNT;
for (unsigned i = 0; i < loops; i++)
{
dummy++;
}
uint32_t end = ARM_DWT_CYCCNT;
float base = end - start;
// activate interrupts and IntervalTimer
interrupts();
t1.begin(test, 5 );
// t2.begin(test2, 5);
// t3.begin(test3, 5);
// t4.begin(test4, 5);
start = ARM_DWT_CYCCNT;
for (unsigned i = 0; i < loops; i++)
{
dummy++;
}
end = ARM_DWT_CYCCNT;
float load = base / (end - start);
Serial.printf("Load: %.3f\n", 100.0 * (1 - load));
}
int tt1=0, tt2=0;
void loop()
{
}