Teensy 4.0 First Beta Test

Status
Not open for further replies.
I'm suspecting it did not get pulled in - was hoping KurtE might be online and see this to confirm.

@bicycleguy - any chance you have a sketchbook\libraries copy of a WIP SPI on your system?

@defragster - @PaulStoffregen

Just checked and Kurt's Pr not incorporated in this beta: https://github.com/PaulStoffregen/ILI9341_t3/pulls

ST7735_t3: Verified working with beta7 -- used uncanny eyes with 2 st7735s - still have that lost usb issue though.

SSD1351: No go on the T4. All errors due to it trying to use SPI for the T3.6. Kurt does have a pull request in to kirberich/teensy_ssd1351, https://github.com/kirberich/teensy_ssd1351/pulls but not pulled in so far
 
FastLED + Teensy 4.0

Sorry for the delays in getting this up and running - I've put up a branch here - https://github.com/FastLED/FastLED/tree/teensy4 - with Teensy 4.0 support for FastLED (after I pushed that branch I saw a comment someone made on the FastLED reddit pointing at a preliminary port someone here had done for it - apologies for having missed that!) - right now it supports clockless chips and uses hardware SPI when it can for the clocked chips - and I'm working on getting non-DMA'd parallel output up and running, and once I have that I'll merge it back into FastlED master and spin a new release for it.
 
@defragster - @PaulStoffregen

Just checked and Kurt's Pr not incorporated in this beta: https://github.com/PaulStoffregen/ILI9341_t3/pulls

ST7735_t3: Verified working with beta7 -- used uncanny eyes with 2 st7735s - still have that lost usb issue though.

SSD1351: No go on the T4. All errors due to it trying to use SPI for the T3.6. Kurt does have a pull request in to kirberich/teensy_ssd1351, https://github.com/kirberich/teensy_ssd1351/pulls but not pulled in so far

Good find @mjs513 - I didn't look in the right spot.

@bicycleguy - is there a local libraries version of WIP ILI9341_t3 in sketchbook?

Note: looking at interrupt code for 'XPT2046_Touchscreen' - it does indeed trigger funny now? It now re-trips a few times and persists after touch stops?

Placing this in the _isr didn't help : asm volatile("dsb");

Is that the right code to stop double dribble on _isr()'s?

In the test sketch it is returning TOUCH data with Zero Pressure p.z
 
The tricky part threw me for so long was the MIX_CTRL register. Teensy 3.6's SDHC controller doesn't have this register at all. If you look at the register list (page 2005-2006 in the K66 manual), there's a hole at offset 0x48. Teensy 4.0 does have this register, at offset 0x48. Interestingly, neither of them has anything documented at offset 0x4C...

On Teensy 3.6, the 4 data line drivers seem to become input or output based on the XFERTYP bit DTDSEL, which happens inside the SDHC_CMD_Do() function. On Teensy 4.0, it seems you also need to write to the (seemingly redundant) MIX_CTRL bit DTDSEL, before starting the command.

Hopefully nobody will ever need to mess with this. But here's a message about the problem just in case I or you or anything else runs across this again.

was also for me completely unclear and it was never obvious to me how to structure code to minimize differences between T3.6 and T4.0.
 
I've uploaded 1.47-beta6. Links on msg #2.

Please give this a try, on Teesny 4.0 and also on older boards. Is anything still broken?


If you have a moment to give 1.47-beta6 a try, please let me know if there's any other bugs I really should fix before releasing it tomorrow?

1.47-beta6 looks good so far. WavFilePlayer/BUILTIN_SDCARD on T4 and T3.5 working.
 
I ...
Have an issue where serial.write(0x04); works but serial.write(0x00) on T4 gives 'call of overloaded 'write(int)' is ambiguous' which can be fixed with a (uint8_t) cast

Just tried to duplicate with your problem with the latest b6 release. It compiled and ran without issue, i.e., no errors. Maybe give it a try again with the latest beta6 release.
 
@defragster - @PaulStoffregen

Just checked and Kurt's Pr not incorporated in this beta: https://github.com/PaulStoffregen/ILI9341_t3/pulls

ST7735_t3: Verified working with beta7 -- used uncanny eyes with 2 st7735s - still have that lost usb issue though.

SSD1351: No go on the T4. All errors due to it trying to use SPI for the T3.6. Kurt does have a pull request in to kirberich/teensy_ssd1351, https://github.com/kirberich/teensy_ssd1351/pulls but not pulled in so far

@defragster

Now that I am awake I just tested the SSD1351 lib with uncannyeyes and the simpletest sketch both work with @KurtE's updated library but not with the current Teensyduino version.
 
Good Morning: I see some stuff has changed :D

Just downloaded and installed on Windows, but have not yet tried anything...

And yes I do have a few outstanding Pull Requests. I have not yet checked to see if some of them may have been superseded by others...

Ones like:

TouchScreen: https://github.com/PaulStoffregen/TouchScreen/pull/2

ILI9341_t3 - A version that runs on T4: https://github.com/PaulStoffregen/ILI9341_t3/pull/52

SSD1351 (Not sure if this is pulled directly from his library?) - https://github.com/kirberich/teensy_ssd1351/pull/1

ILI9488 - I don't think this one is in builds... https://github.com/jaretburkett/ILI9488/pull/7

But I sort of figured there are probably a few other things to take care of. May still need to setup uncanny eyes again and see if we can figure out what is happening.
 
@ defragster

Good find @mjs513 - I didn't look in the right spot.

@bicycleguy - is there a local libraries version of WIP ILI9341_t3 in sketchbook?

Note: looking at interrupt code for 'XPT2046_Touchscreen' - it does indeed trigger funny now? It now re-trips a few times and persists after touch stops?

Placing this in the _isr didn't help : asm volatile("dsb");

Is that the right code to stop double dribble on _isr()'s?

In the test sketch it is returning TOUCH data with Zero Pressure p.z

Not sure what your after but no I don't think a local WIP(work in progress?) ILI9341_t3 is used. Below shows the libraries used for T3.5. The touchscreen works fine.

Also, I only compiled for 4.0, didn't wire up and test yet.

Code:
/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/michaelrunyan/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/michaelrunyan/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/michaelrunyan/Documents/Arduino/libraries -fqbn=teensy:avr:teensy35:usb=serial,speed=120,opt=o2std,keys=en-us -ide-version=10809 -build-path /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457 -warnings=default -build-cache /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_cache_34404 -verbose /Users/michaelrunyan/Documents/Arduino/AVNA ILI9341  TESTS/ILI9341Test_AVNA/ILI9341Test_AVNA.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/michaelrunyan/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/michaelrunyan/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/michaelrunyan/Documents/Arduino/libraries -fqbn=teensy:avr:teensy35:usb=serial,speed=120,opt=o2std,keys=en-us -ide-version=10809 -build-path /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457 -warnings=default -build-cache /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_cache_34404 -verbose /Users/michaelrunyan/Documents/Arduino/AVNA ILI9341  TESTS/ILI9341Test_AVNA/ILI9341Test_AVNA.ino
Using board 'teensy35' from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr
Using core 'teensy3' from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr
Detecting libraries used...
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK64FX512__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=120000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3 /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/sketch/ILI9341Test_AVNA.ino.cpp -o /dev/null
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK64FX512__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=120000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3 /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/sketch/ILI9341Test_AVNA.ino.cpp -o /dev/null
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK64FX512__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=120000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/XPT2046_Touchscreen /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/sketch/ILI9341Test_AVNA.ino.cpp -o /dev/null
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK64FX512__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=120000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/XPT2046_Touchscreen -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/sketch/ILI9341Test_AVNA.ino.cpp -o /dev/null
Using cached library dependencies for file: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3/ILI9341_t3.cpp
Using cached library dependencies for file: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3/font_Arial.c
Using cached library dependencies for file: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3/font_ArialBold.c
Using cached library dependencies for file: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3/glcdfont.c
Using cached library dependencies for file: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/XPT2046_Touchscreen/XPT2046_Touchscreen.cpp
Using cached library dependencies for file: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI/SPI.cpp
Generating function prototypes...
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK64FX512__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=120000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/XPT2046_Touchscreen -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/sketch/ILI9341Test_AVNA.ino.cpp -o /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/preproc/ctags_target_for_gcc_minus_e.cpp
/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/precompile_helper /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3 /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457 /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK64FX512__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=120000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3 /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/pch/Arduino.h -o /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/pch/Arduino.h.gch
Using previously compiled file: /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/pch/Arduino.h.gch
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK64FX512__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=120000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/pch -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3 -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/XPT2046_Touchscreen -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/sketch/ILI9341Test_AVNA.ino.cpp -o /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/sketch/ILI9341Test_AVNA.ino.cpp.o
Compiling libraries...
Compiling library "ILI9341_t3"
Using previously compiled file: /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/ILI9341_t3/font_Arial.c.o
Using previously compiled file: /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/ILI9341_t3/font_ArialBold.c.o
Using previously compiled file: /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/ILI9341_t3/glcdfont.c.o
Using previously compiled file: /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/ILI9341_t3/ILI9341_t3.cpp.o
Compiling library "XPT2046_Touchscreen"
Using previously compiled file: /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/XPT2046_Touchscreen/XPT2046_Touchscreen.cpp.o
Compiling library "SPI"
Using previously compiled file: /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/SPI/SPI.cpp.o
Compiling core...
Using precompiled core: /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_cache_34404/core/core_a453476bcdabb0e57b0149e90c082466.a
Linking everything together...
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-gcc -O2 -Wl,--gc-sections,--relax,--defsym=__rtc_localtime=1565598342 -T/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/mk64fx512.ld -lstdc++ -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -o /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/ILI9341Test_AVNA.ino.elf /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/sketch/ILI9341Test_AVNA.ino.cpp.o /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/ILI9341_t3/ILI9341_t3.cpp.o /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/ILI9341_t3/font_Arial.c.o /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/ILI9341_t3/font_ArialBold.c.o /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/ILI9341_t3/glcdfont.c.o /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/XPT2046_Touchscreen/XPT2046_Touchscreen.cpp.o /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/libraries/SPI/SPI.cpp.o /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/../arduino_cache_34404/core/core_a453476bcdabb0e57b0149e90c082466.a -L/var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457 -larm_cortexM4lf_math -lm
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/ILI9341Test_AVNA.ino.elf /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/ILI9341Test_AVNA.ino.eep
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy -O ihex -R .eeprom /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/ILI9341Test_AVNA.ino.elf /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/ILI9341Test_AVNA.ino.hex
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/stdout_redirect /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/ILI9341Test_AVNA.ino.lst /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-objdump -d -S -C /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/ILI9341Test_AVNA.ino.elf
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/stdout_redirect /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/ILI9341Test_AVNA.ino.sym /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-objdump -t -C /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/ILI9341Test_AVNA.ino.elf
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/teensy_post_compile -file=ILI9341Test_AVNA.ino -path=/var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457 -tools=/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/ -board=TEENSY35
Using library ILI9341_t3 at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3 
Using library XPT2046_Touchscreen at version 1.3 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/XPT2046_Touchscreen 
Using library SPI at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI 
/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-size -A /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/ILI9341Test_AVNA.ino.elf
Sketch uses 57032 bytes (10%) of program storage space. Maximum is 524288 bytes.
Global variables use 5668 bytes (2%) of dynamic memory, leaving 256468 bytes for local variables. Maximum is 262136 bytes.
 
@mjs513
Just tried to duplicate with your problem with the latest b6 release. It compiled and ran without issue, i.e., no errors. Maybe give it a try again with the latest beta6 release.

Here's a snippet that shows the error:
Code:
#define theLCD Serial1

void setup() {
  // put your setup code here, to run once:
  lcd_custom(); 
}

void loop() {
  // put your main code here, to run repeatedly:

}

void lcd_custom(){  //see 'font bit map.ods' for auto calc
  theLCD.write(0xFE);
  theLCD.write(0x54);
  theLCD.write(0x00); //address for up arrow,  mdr20190818 caused error on T4 without (uint8_t)
  theLCD.write((uint8_t)0x00); // 1
  theLCD.write(0x04);              // 2
  theLCD.write(0x0E);              // 3
  theLCD.write(0x15);              // 4
  theLCD.write(0x04);              // 5
  theLCD.write(0x04);              // 6
  theLCD.write(0x04);              // 7
  theLCD.write(0x04);              // 8
  theLCD.write(0xFE); 
  theLCD.write(0x54);
  theLCD.write(0x01); //address for down arrow
  theLCD.write(0x04);  // 1
  theLCD.write(0x04);  // 2
  theLCD.write(0x04);  // 3
  theLCD.write(0x04);  // 4
  theLCD.write(0x15);  // 5
  theLCD.write(0x0E);  // 6
  theLCD.write(0x04);  // 7
  theLCD.write((uint8_t)0x00);  // 8
}

Works if change Serial1 to Serial
 
Last edited:
@ defragster

Not sure what your after but no I don't think a local WIP(work in progress?) ILI9341_t3 is used. Below shows the libraries used for T3.5. The touchscreen works fine.

Also, I only compiled for 4.0, didn't wire up and test yet.

Code:
// ...

/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/teensy_post_compile -file=ILI9341Test_AVNA.ino  [COLOR="#FF0000"]" … "[/COLOR] -[B]board=TEENSY35[/B]
[U]Using library ILI9341_t3 at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/ILI9341_t3 
Using library XPT2046_Touchscreen at version 1.3 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/XPT2046_Touchscreen 
Using library SPI at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI 
[/U]/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-size -A /var/folders/b9/m7vp5hr925n_3r73_y07979w0000gn/T/arduino_build_945457/ILI9341Test_AVNA.ino.elf
Sketch uses 57032 bytes (10%) of program storage space. Maximum is 524288 bytes.
Global variables use 5668 bytes (2%) of dynamic memory, leaving 256468 bytes for local variables. Maximum is 262136 bytes.

Yes - Work In Progress :)

Indeed that shows using the Installed libs, however that shows it built for T_3.5 - which works, not Teensy 4. The problem is on compile for Teensy 4 the installed ILI9341_t3 will fail to compile.
 
Yes - Work In Progress :)

Indeed that shows using the Installed libs, however that shows it built for T_3.5 - which works, not Teensy 4. The problem is on compile for Teensy 4 the installed ILI9341_t3 will fail to compile.

Sorry, I messed up, must be the Alzheimers. Could have sworn it compiled for 4.0, so of course all my ILI9341_t3 programs don't compile now. To bad can't edit my earlier post.
 
I tried downloading latest beta for Linux arm 32, to install on rpi4 and tried running it, and system said it was invalid?

Anyone tried on other Linux arm systems?

Also tried building teensy clip program I updated for t4, but it did not like hex file I built on windows machine, and copied over to rpi4
 
Sorry, I messed up, must be the Alzheimers. Could have sworn it compiled for 4.0, so of course all my ILI9341_t3 programs don't compile now. To bad can't edit my earlier post.

Guess I am confused. I have graphicstest running on a T3.6 running without an issue using the ILI9341_t3 library? I am running Arduino IDE 1.8.9 with Tduino 1.47 beta6 on a windows 10 x64.
 
Guess I am confused. I have graphicstest running on a T3.6 running without an issue using the ILI9341_t3 library? I am running Arduino IDE 1.8.9 with Tduino 1.47 beta6 on a windows 10 x64.

Perhaps so :)

prior post suggested @bicycleguy saw a valid build for T4 of the ili9341_t3 - but that turned out to be with T_3.5 board selected.

Indeed the T4 won't build with the TD1.47b6 ILI9341_t3 lib as noted.

@mjs513 - what pin is used for T4's FreqCount()?
 
Guess I am confused. I have graphicstest running on a T3.6 running without an issue using the ILI9341_t3 library? I am running Arduino IDE 1.8.9 with Tduino 1.47 beta6 on a windows 10 x64.
Yes, same as you except on MacOS Mojave 110.14.6. All my ILI9341_t3 programs compile and run correctly with beta6 on T3.2, 3.5, 3.6 and none of them compile for T4.

thanks for the help
 
Perhaps so :)

prior post suggested @bicycleguy saw a valid build for T4 of the ili9341_t3 - but that turned out to be with T_3.5 board selected.

Indeed the T4 won't build with the TD1.47b6 ILI9341_t3 lib as noted.

@mjs513 - what pin is used for T4's FreqCount()?

Pin 9 for freqCount
 
Yes, same as you except on MacOS Mojave 110.14.6. All my ILI9341_t3 programs compile and run correctly with beta6 on T3.2, 3.5, 3.6 and none of them compile for T4.

thanks for the help

Sorry just got confused. Yeah - T4 is the only board it wont compile on until the PR is incorporated.
 
@mjs513


Here's a snippet that shows the error:
Code:
#define theLCD Serial1

void setup() {
  // put your setup code here, to run once:
  lcd_custom(); 
}

void loop() {
  // put your main code here, to run repeatedly:

}

void lcd_custom(){  //see 'font bit map.ods' for auto calc
  theLCD.write(0xFE);
  theLCD.write(0x54);
  theLCD.write(0x00); //address for up arrow,  mdr20190818 caused error on T4 without (uint8_t)
  theLCD.write((uint8_t)0x00); // 1
  theLCD.write(0x04);              // 2
  theLCD.write(0x0E);              // 3
  theLCD.write(0x15);              // 4
  theLCD.write(0x04);              // 5
  theLCD.write(0x04);              // 6
  theLCD.write(0x04);              // 7
  theLCD.write(0x04);              // 8
  theLCD.write(0xFE); 
  theLCD.write(0x54);
  theLCD.write(0x01); //address for down arrow
  theLCD.write(0x04);  // 1
  theLCD.write(0x04);  // 2
  theLCD.write(0x04);  // 3
  theLCD.write(0x04);  // 4
  theLCD.write(0x15);  // 5
  theLCD.write(0x0E);  // 6
  theLCD.write(0x04);  // 7
  theLCD.write((uint8_t)0x00);  // 8
}

Works if change Serial1 to Serial

using Serial instead of Serial1, in RealTerm I am seeing:
Code:
FE  54  00  00  04  0E  15  04  04  04  04  FE  54  01  04  04  04  04  15  0E  04  00

Also changed the last line to theLCD.write(0x00). I am using a T4 for testing.

What am I missing that you are having a problem with?
 
Works if change Serial1 to Serial

I've committed a fix for Serial1.write(0x00)

https://github.com/PaulStoffregen/cores/commit/a4c6f53307c458d3072644ea2c407b03eb2d91c1

Your program is also lacking begin(baud), which is optional for USB serial (where the baud rate is ignored) but required for hardware serial.

I ran it here on Teensy 4.0 with both of these fixes. This is the waveform on TX1.

file.png

Here's the exact code I tested.

Code:
#define theLCD Serial1

void setup() {
  theLCD.begin(9600);
  lcd_custom(); 
}

void loop() {
}

void lcd_custom(){  //see 'font bit map.ods' for auto calc
  theLCD.write(0xFE);
  theLCD.write(0x54);
  theLCD.write(0x00); //address for up arrow,  mdr20190818 caused error on T4 without (uint8_t)
  theLCD.write((uint8_t)0x00); // 1
  theLCD.write(0x04);              // 2
  theLCD.write(0x0E);              // 3
  theLCD.write(0x15);              // 4
  theLCD.write(0x04);              // 5
  theLCD.write(0x04);              // 6
  theLCD.write(0x04);              // 7
  theLCD.write(0x04);              // 8
  theLCD.write(0xFE); 
  theLCD.write(0x54);
  theLCD.write(0x01); //address for down arrow
  theLCD.write(0x04);  // 1
  theLCD.write(0x04);  // 2
  theLCD.write(0x04);  // 3
  theLCD.write(0x04);  // 4
  theLCD.write(0x15);  // 5
  theLCD.write(0x0E);  // 6
  theLCD.write(0x04);  // 7
  theLCD.write((uint8_t)0x00);  // 8
}
 
T4 pin 9, QTIMER4 chnl 2

Pin 9 for freqCount

Thanks - I see that now :: IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_11 = 1; // QT4 Timer2 on pin 9

And … I got the freqCount code working …

I did a quick version of
Code:
static inline void delayCycles(uint32_t) __attribute__((always_inline, unused));
static inline void delayCycles(uint32_t cycles)
{ // MIN return in 7 cycles NEAR 20 cycles it gives wait +/- 2 cycles - with sketch timing overhead
	uint32_t begin = ARM_DWT_CYCCNT-10; // Overhead Factor for execution
	while (ARM_DWT_CYCCNT - begin < cycles) ; // wait 
}

Added a Pull Request for delayCycles() - results in usable minimum around 20 cycles on T4 @600 MHz - which is 1/30th of a nanosecond +/- a couple of ticks.

Test Code:
Code:
	for ( int ii = 8; ii < 50; ii++ ) {
		uint32_t begin = ARM_DWT_CYCCNT;
		delayCycles( ii );
		begin = ARM_DWT_CYCCNT - begin;
		if ( (ii+3) >= begin ) 
		{
			Serial.print("delayCycles ==" );
			Serial.print( ii );
			Serial.print(" gives cycles = " );
			Serial.println(begin );
		}
	}

output updated test against -10 to -13 overhead factor - changed pull request to -10::
Code:
delayCycles ==8 gives cycles = 	6.98	6.97	6.56	6.95
delayCycles ==9 gives cycles = 	6.68	6.68	6.27	6.66
delayCycles ==10 gives cycles = 	6.68	6.68	6.27	6.66
delayCycles ==11 gives cycles = 	6.68	6.68	6.27	6.66
delayCycles ==12 gives cycles = 	6.68	6.68	6.27	6.66
delayCycles ==13 gives cycles = 	15.68	6.68	6.27	6.66
delayCycles ==14 gives cycles = 	15.68	15.68	6.27	6.66
delayCycles ==15 gives cycles = 	15.68	15.68	15.27	6.66
delayCycles ==16 gives cycles = 	15.68	15.68	15.27	15.66
delayCycles ==17 gives cycles = 	15.68	15.68	15.27	15.66
delayCycles ==18 gives cycles = 	18.86	15.68	15.27	15.66
delayCycles ==19 gives cycles = 	15.68	15.68	15.27	15.66
delayCycles ==20 gives cycles = 	15.68	15.68	15.27	15.66
delayCycles ==21 gives cycles = 	15.68	15.68	15.27	15.66
delayCycles ==22 gives cycles = 	24.33	15.68	15.27	15.66
delayCycles ==23 gives cycles = 	24.08	24.13	15.27	15.66
delayCycles ==24 gives cycles = 	24.08	23.88	23.67	15.66
delayCycles ==25 gives cycles = 	28.08	23.88	23.47	24.11
delayCycles ==26 gives cycles = 	28.08	27.88	23.47	23.86
delayCycles ==27 gives cycles = 	28.08	27.88	27.47	23.86
delayCycles ==28 gives cycles = 	28.08	27.88	27.47	27.86
delayCycles ==29 gives cycles = 	32.08	27.88	27.47	27.86
delayCycles ==30 gives cycles = 	32.08	31.88	27.47	27.86
delayCycles ==31 gives cycles = 	32.08	31.88	31.47	27.86
delayCycles ==32 gives cycles = 	32.08	31.88	31.47	31.86
delayCycles ==33 gives cycles = 	36.08	31.88	31.47	31.86
delayCycles ==34 gives cycles = 	36.08	35.88	31.47	31.86
delayCycles ==35 gives cycles = 	36.08	35.88	35.47	31.86
delayCycles ==36 gives cycles = 	36.08	35.88	35.47	35.86
delayCycles ==37 gives cycles = 	40.08	35.88	35.47	35.86
delayCycles ==38 gives cycles = 	40.08	39.88	35.47	35.86
delayCycles ==39 gives cycles = 	40.08	39.88	39.47	35.86
delayCycles ==40 gives cycles = 	40.08	39.88	39.47	39.86
delayCycles ==41 gives cycles = 	44.08	39.88	39.47	39.86
delayCycles ==42 gives cycles = 	44.08	43.88	39.47	39.86
delayCycles ==43 gives cycles = 	44.08	43.88	43.47	39.86
delayCycles ==44 gives cycles = 	44.08	43.88	43.47	43.86
delayCycles ==45 gives cycles = 	48.08	43.88	43.47	43.86
delayCycles ==46 gives cycles = 	48.08	47.88	43.47	43.86
delayCycles ==47 gives cycles = 	48.08	47.88	47.47	43.86
delayCycles ==48 gives cycles = 	48.08	47.88	47.47	47.86
delayCycles ==49 gives cycles = 	52.08	47.88	47.47	47.86
 
Last edited:
Re: T4 frequency count

I received two T4's today. I soldered male headers on one and plugged into breadboard. I ran my qtmrcnt sketch with pin 8 PWM jumpered to pin 9. With PWM at 40mhz count is 37.5 mhz as expected , and lower frequency counts are correct. But I don't get good counts with PWM @50mhz or 75mhz. Running same code on T4B2R, I still can properly count 50 and 75 mhz.
The second new T4 I soldered long pin female headers. It too won't count correctly above 37.5 mhz ???

all tests built with 1.8.8 1.47-beta5
 
Re: T4 frequency count

I received two T4's today. I soldered male headers on one and plugged into breadboard. I ran my qtmrcnt sketch with pin 8 PWM jumpered to pin 9. With PWM at 40mhz count is 37.5 mhz as expected , and lower frequency counts are correct. But I don't get good counts with PWM @50mhz or 75mhz. Running same code on T4B2R, I still can properly count 50 and 75 mhz.
The second new T4 I soldered long pin female headers. It too won't count correctly above 37.5 mhz ???

all tests built with 1.8.8 1.47-beta5

@Defrag sterling and both had this problem when going from pin to pin 9
But didn't see it with your standalone sketch. That was one of the reasons I went to the clock generator. Will retest it tomorrow as well. Oh BTW do you have gnd to gnd. Sorry had to ask.
 
Status
Not open for further replies.
Back
Top