
Originally Posted by
defragster
@KurtE - I'm sure whatever makes sense to you from that will be good
QUESTION: Is necessary to have inside the while()? When I was testing the debug_tt trace I put a trace on nvic_execution_priority() and it was called MANY times!
Code:
size_t HardwareSerial::write9bit(uint32_t c)
// ...
while (tx_buffer_tail_ == head) {
int priority = nvic_execution_priority();
I agree, I just copy and pasted from the T3.x function like what is in core3/serial1.c.
My guess is there is a slight possibility in the SerialX.write() case, that maybe there could be a usage case where maybe the SerialX. is called at a high priority, a higher priority IRQ happens, which maybe changes the priority of the mainline so when it returns, that maybe the condition changed? Again long shot, but figured it did not hurt anything as the code is mostly spinning doing nothing while it waits for data to be shifted out the UART...

Originally Posted by
defragster
Hope the adds to your SPI test are reasonable - they seemed like they would add stress - and it did not interfere with your SPI code or the timing.
Thanks, it is currently running on my machine
I did have to edit it and replace the few Serial.print... to DBGSerial.print... where DBGSerial was defined as Serial4. With it calling the USB... Ran for awhile and now looks like I got a crash to look at.
Code:
ests completed
Press any key to run test
Ready to start tests
IntvTimer jj=1835312 IntvTimer jj=1836258 ms Time=3679
ms Time=3680 deg C=36.55
Increasing voltage to 1300 mV
need to switch to alternate clock during reconfigure of ARM PLL
USB PLL is running, so we can use 120 MHz
Freq: 12 MHz * 67 / 1 / 1
ARM PLL=8000203A
ARM PLL needs reconfigure
ARM PLL=80002043
New Frequency: ARM=804000000, IPG=201000000
need to switch to alternate clock during reconfigure of ARM PLL
USB PLL is running, so we can use 120 MHz
Freq: 12 MHz * 67 / 1 / 1
ARM PLL=80002043
ARM PLL already running at required frequency
Fault irq 3
stacked_r0 :: 4A65A527
stacked_r1 :: 0001FBD0
stacked_r2 :: 00410002
stacked_r3 :: 00000000
stacked_r12 :: 4659E827
stacked_lr :: 0000022F
stacked_pc :: 46D90002
stacked_psr :: 0001008A
_CFSR :: 00020000
_HFSR :: 40000000
_DFSR :: 00000000
_AFSR :: 00000001
_BFAR :: E000ED38
_MMAR :: FFFFFFF1
need to switch to alternate clock during reconfigure of ARM PLL
USB PLL is running, so we can use 120 MHz
Freq: 12 MHz * 75 / 3 / 1
ARM PLL=80002043
ARM PLL needs reconfigure
ARM PLL=8000204B
New Frequency: ARM=300000000, IPG=150000000
Decreasing voltage to 1150 mV

Originally Posted by
defragster
Looking at NXP to see if they did any DOC Rev's and the new ones seemed minor - in the process I read about the 1060 FlexIO's #3 channel having better/faster clock option - not sure if you saw that and if it will help.
Let me know about the TeensyView - if you give me the wire diagram I'll hook one up - hopefully the cracked glass isn't a bad sign. I do have another new in box.
I think I have one of the ssd1306 units that is typically i2c - the 64 high not 32 like the TView - that must be SPI as it has extra pins on the breakout including CS and DS - but still has pins labelled SDA SCL not MOSI MISO ????
Now back to playing... Also digging out the other displays