Teensy 4.0 First Beta Test

Status
Not open for further replies.
@KurtE

I just pushed an update to the ILI9488 library to use SPI1/SPI2 on the T4B2 that works. EDIT: Just remember to specify the MISO, MOSI, SCK pins for SPI1/SPI2 then it works perfectly.

Hi Mike, Will pick up your changes. Did the display actually work for you? I also updated the code some yesterday, but was finding issues with SPI, that I am trying to debug.

So far I believe there are issues with the MUX Input select registers. (example on page 833 of PDF for 1060).
Code:
LPSPI1_SCK_SELECT_INPUT DAISY 
0 GPIO_EMC_27_ALT3 — Selecting Pad: GPIO_EMC_27 for Mode: ALT3
1 GPIO_SD_B0_00_ALT4 — Selecting Pad: GPIO_SD_B0_00 for Mode: ALT4
So default is not the SD card pins, so need to set to 1...

So in process of trying out SPI2 (which used LPSP1) to set the Input select registers...

Still more to go!
 
Hi Mike, Will pick up your changes. Did the display actually work for you? I also updated the code some yesterday, but was finding issues with SPI, that I am trying to debug.

So far I believe there are issues with the MUX Input select registers. (example on page 833 of PDF for 1060).
Code:
LPSPI1_SCK_SELECT_INPUT DAISY 
0 GPIO_EMC_27_ALT3 — Selecting Pad: GPIO_EMC_27 for Mode: ALT3
1 GPIO_SD_B0_00_ALT4 — Selecting Pad: GPIO_SD_B0_00 for Mode: ALT4
So default is not the SD card pins, so need to set to 1...

So in process of trying out SPI2 (which used LPSP1) to set the Input select registers...

Still more to go!

I only tested with SPI haven't tried SPI1 yet
 
I only tested with SPI haven't tried SPI1 yet
I just pushed up changes to my SPI branch: https://github.com/KurtE/SPI/tree/T4B2_SPI1_SPI2

I used my hacked up version of ILI9488 on SPI2 and my test app appears now to be working.
T4B2---SPI2-display.jpg

Hopefully I obscured the processor in picture enough ;)

Used Sparkfun SD breakout board... Somewhere around here I have some I made for T3.5/6 testing...

In case anyone wants my current version of XLS document for T4B2 where I added the page with nicer names...

I have not tested yet on SPI1 as I don't have any adapter to get to the bottom pins, but I did put in Input Select Mux values which I think are correct.

Also need to retest that SPI works, it is also now setting Input select values but all of them are set to 0 (default pin)
 

Attachments

  • Teensy4 Pins.zip
    28.6 KB · Views: 95
Looks like the problem is only with MCLK. I tested many resistors. 22 ohms to 4.7K seem to work fine. 10 ohms or less definitely does not work.

To make this change on the new board, I first cut the MCLK trace.

View attachment 16477

Then I tinned the bare copper and soldered a 100 ohm resistor across the gap.

View attachment 16478

Unfortunately this appears to be the only way to get the audio shield to work with the beta #2.

Yes, that works. I used a 68 ohm resistor.
 
@mjs513 (and others) - Thought I would try out all of my changes back on Beta 1 board and it looks like my ILI9341_t3n code is faulting... Did find I needed to update some of my core changes to go again with B1... Pulled PR for cores as it required a merge. Will reissue new one with no merge required once I figure out why SPI on 1052 is not working... (Or could be something else... Not sure yet)

Currently the demosauce program is not compiling...

Thought I would mention our updated version of ILI9341_t3 library compiled and ran on B1 board. Once I remembered I had Reset pin set to MCLK and that is pin 23...

Now to generate new PR...
 
Last edited:
@KurtE
That's funny - think I pulled in all your changes - but maybe I forgot the latest core -- any I just compiled for B1 (demosauce and graphicstest) with no compile errors. But since you are redoing the core anyway I will wait.
 
@mjs513 and @Paul and others...


I created a new branch to create version that can PR without merge: https://github.com/KurtE/cores/tree/T4_B2_PR
Created PR: https://github.com/PaulStoffregen/cores/pull/366


I also issues PR for SPI (which requires the above PR) https://github.com/PaulStoffregen/SPI/pull/46
That creates SPI1 and SPI2 for B2 board.

Note: I could have made both PRs probably valid for B1 as well, but as this board is only temporary and I have no easy way to test B1 boards SDCard nor bottom pins, I did not make these changes apply to B1.

Kurt
 
@Paul and others -

Thought I would start making the mods for FlexIO for Beta 2 board. This includes a new FLexIO controller(3)...

So far I found that imxrt.h does not include some of the definitions...

So far CCM_CCGR7 and it's bits are not defined.

I Have local, will work through rest.

Should I include this in my above PR or do separate PR for missing defines?

Still have more to go as some of the DMAMUX_SOURCE_... are not defined either.

Also Interrupts? Wondering looks like either current stuff in imxrt.h is wrong or my pdf is...
PDF shows:
Code:
153 ENET2 - MAC 0 1588 Timer Interrupt – synchronous
154 FLEXCAN3 
155 Reserved - Reserved
156 FLEXIO3 OR FlexIO3 interrupt
But current IMXRT shows: IRQ_CAN3 = 156, // RT1060 only

Will change CAN3 to 154 and add FLEXIO3 ?

Maybe I am missing it, but I don't see any DMA sources defined for FlexIO3
Note: I am using the 1060 processor Reference Manual data 8/2018
 
Last edited:
Just thought I would mention it looks like there is a more up to date version of the IMXRT 1060RM that was up on their web site (requires a login)
Their web site show 1st Feb 2019 - The document is dated 12/2018 as Rev 1.

Not sure yet what the differences are.

From document:
B.1 Change summary for this latest revision
Major changes in this revision are as follows:
• ADC channel number fixed in the Introduction chapter: "Block Diagram" and
"Features" sections
• Some update in the System Boot chapter: table "ROM Bootloader Peripheral
PinMux"
• Minor fix in the System Boot chapter: table "LUT sequence definition for Serial
NOR"
• Some update in the External Signals and Pin Multiplexing chapter: table "Muxing
Options", GPT rows
• Note updated in the Clock and Power Management chapter: section "Crystal
Oscillator (XTALOSC)"
• Minor fix in the CCM chapter: removed the redundant table “System Clocks, Gating,
and Override” in the section "System Clocks"
• Some update in the CCM chapter: section "PLL reference clock"
• Minor fix in the SNVS chapter: section "SNVS Structure"
• Minor update in the Fusemap chapter: table "Fusemap Descriptions"
• Note added in the SEMC chapter: section "Chip-specific SEMC information"
• Some updates in the SEMC chapter: "Features", "Signals" and "Pin Mux in SEMC"
sections
• Minor update in the CSI chapter, “connect with two 8-bit sensors” not supported
• Minor fix in the USB Command Register (USB_nUSBCMD): bit14 ATDTW
• Some update in the FlexCAN register part: DBG registers added
• Minor fix in the LPUART register part: base address
i.MX
 
Yes, that works. I used a 68 ohm resistor.

My Audio Board is working with a 560 ohm resistor as pictured - assuming any output from guitar and tonesweep only work to the headphones with the edit.

@KurtE - if you put your USB<>UART adapter Tx and GND to T4-2 BB's Serial[1 or 2] Rx when it is unpowered do you get a glow on the LED and then not get T4 startup but green LED on when powered?

@mjs513 - TempMon is certainly fine as Paul noted - what is critical is the MCU's view of overtemp shutdown point. If that is the data it is giving as it would use it then it seems to accurately track the expected thermal output through high and low MCU load and fast and slow speed along with observed external temp. It seems high against the feel of the MCU case - but even 800 MHz under load was not nearly too hot to touch at ~110 °F at hottest point IR Temp reading on the more compact PCB - and it completes CoreMark at 800 MHz without fault on my unit - so 600 MHz should be good to go. And laying an upside down 6 gram heat sink dropped the reported temp about 5 °C
 
@KurtE - thanks for the update. I just downloaded it yesterday and indeed it has a data of 12/2018 on it.

@defragster - was working on debugging it yesterday and saw the same effect if you put a heatsink on it. The over temp alarm is set to 90degC. I had tested it at a much lower temp when I first posted the change to the core at a lower alarm temp of course and what happens it goes into an infinite restart cycle until the temp drops. We originally discussed what should happen when the alarm hits but nothing was finalized - @FrankB was looking at it at the time. Other events over took that one with everything else we were testing and fixing.
 
Is there some code to test the SD Slot on he new board?

Got my own first T4B2 board today - good timing.
It has a Audioshield - had to insert a resitor to MCLK, too.
USB works on my board (with the TPS chip), have to test SD now.

Soldring pogo-pins for SD is a really a pain :) Paul - can you offer (=sell) some help for it.. like some stacked boards with the holes on the right place?
Not sure wether mine align properly or not..
 
@Frank B

Just used the example SD Sketch in the SDcard library (you will need the updated version - saw incorporated the merge). Then setMISO, setMOSI and setClk to: SPI2 pins (36(CS), 35(MOSI), 34(MISO), 37(CLK).
 
@mjs thank you !
SD works on Pauls' board - not on mine :-( grrr..


Edit: A bad solder joint on the socket. Solved.
Now trying the display.
 
Last edited:
I did a github sync to T4_B2_PR and copied over my install where I had just built the Audio sketches.

Everything builds and runs - but the same sketches are making ZERO output to the headphones :(

I did close and restart IDE … scanning recent changes anything suspicious escapes me …

<edit> I didn't save old Cores - so did full TD1.46 install and compile worked for Audio sound.
 
Last edited:
@mjs thank you !
SD works on Pauls' board - not on mine :-( grrr..

Your board? Your breakout board? Mine is a work in process - found a couple layout errors you want to talk about grrr :(

@KurtE - your spreadsheet is really coming in handy
 
@Frank B

Just used the example SD Sketch in the SDcard library (you will need the updated version - saw incorporated the merge). Then setMISO, setMOSI and setClk to: SPI2 pins (36(CS), 35(MOSI), 34(MISO), 37(CLK).

@mjs513 - I got KurtE/SPI/tree/T4B2_SPI1_SPI2 and Cardinfo.ino compiles with:
Code:
const int chipSelect = 36; // BUILTIN_SDCARD;    

void setup()
{
  //UNCOMMENT THESE TWO LINES FOR TEENSY AUDIO BOARD:
  SPI2.setMOSI(35);  // Audio shield has MOSI on pin 7
  SPI2.setSCK(37);  // Audio shield has SCK on pin 14
  SPI2.setMISO(34);  // Audio shield has SCK on pin 14

But no card recognized? Expect I'm missing something "the updated version - saw incorporated the merge" as I did the Pin signal test sketch and found voltage <2V on the pins - except 3.3V and GND.

Which merge was that?
 
@defragster: yes, this works.

I think this red thingy keeps me busy testing the T4 for the next days:
- 3 Encoders
- 5 Buttons
- Display
- PJRC Audio board (had to add the MCLK resistor)
- USB-Host (with TPS-chip)
- SD-Slot
- RTC Battery Backup
- PCF8574 I2C Port Expander
- additional parts for a SDR
20190425_002937_m.png20190425_002856_m.png

...as usual with a few issues and some wires hidden under the display .. :)
 
Last edited:
@defragster

The modified sd library for T4B2: https://github.com/PaulStoffregen/SD.

EDIT:
Just reran it and confirmed working with latest changes by Kurt

I didn't keep the latest KurtE changes since it broke Audio … is that needed too?
I just got the PJRC/SD - no change in results - am I missing a step to move SPI to SPI2?

It DOES work (with 2 cards) asking for AudioCard SD with the provided commented settings!

Here is the code block as edited:
Code:
[B]#define USE_AUDIO_SD 1[/B]
[U]#ifdef USE_AUDIO_SD[/U]
const int chipSelect = 10; // BUILTIN_SDCARD;    

void setup()
{
  SPI.setMOSI(7);  // Audio shield has MOSI on pin 7
  SPI.setSCK(14);  // Audio shield has SCK on pin 14
[U]#else[/U]
const int chipSelect = 36; // BUILTIN_SDCARD;    

void setup()
{
  SPI2.setMOSI(35);  // Audio shield has MOSI on pin 7
  SPI2.setSCK(37);  // Audio shield has SCK on pin 14
  SPI2.setMISO(34);  // Audio shield has SCK on pin 14  
[U]#endif[/U]
 
@defragster: yes, this works.

I think this red thingy keeps me busy testing the T4 for the next days:
- 3 Encoders
- 5 Buttons
- Display
- PJRC Audio board (had to add the MCLK resistor)
- USB-Host (with TPS-chip)
- SD-Slot
- RTC Battery Backup
- PCF8574 I2C Port Expander
- additional parts for a SDR


...as usual with a few issues and some wires hidden under the display .. :)

That is AWESOME Frank! Congratulations! Glad it worked first time … after good soldering :)

Is that an 8MB RAM by the USB port? - or the TPS chip ...
 
It is the TPS-Chip.
I've tested the 8MB RAM with th T3.6 only, so far.
I'll make little board for it, when i've figured out how to use quad-spi with flexio.
 
defragster said:
I didn't keep the latest KurtE changes since it broke Audio … is that needed too?
I just got the PJRC/SD - no change in results - am I missing a step to move SPI to SPI2?

It DOES work (with 2 cards) asking for AudioCard SD with the provided commented settings!

Here is the code block as edited:

Not sure you need he SPI changes because it will run with SPI.setMOSI(#) just as well. But you will probably need his core files for the additional pins.

Not sure Kurt broke Audio with his spi changes :).
 
Status
Not open for further replies.
Back
Top