K66 Beta Test

Status
Not open for further replies.
Times are in microseconds
Code:
             T3.2@120mhz   K66@180mhz
NXP             3396            285
madgwick         223              7
mahony           125              3

Impressive!!!!!!!!!!!

Am I missed the trick to get the serial working at 180Mhz or have to use Serial1?
 
Last edited:
BUG
The RNG register addresses in kinetis.h did NOT work! I used the register addresses from my MBED K64F tests, and then RNG worked

these worked

#define RNG_CR (*(volatile uint32_t *)0x40029000) // RNGA Control Register
#define RNG_SR (*(volatile uint32_t *)0x40029004) // RNGA Status Register
#define RNG_ER (*(volatile uint32_t *)0x40029008) // RNGA Entropy Register
#define RNG_OR (*(volatile uint32_t *)0x4002900C) // RNGA Output Register

That's interesting and a big bug in the manual !
 
Maybe a bit late to the party, but wonderful news! I've signed myself up for third or four round because I'm still on holidays (writing you this from sunny Sitges beach :cool: ). I won't be able to do much code porting, but I'll sure give the K66 some good usage tests in some industrial applications (mainly industrial field busses and datalogging). Looking forward to it.
 
Are the filters using the "0x5f3759df" fast inverse square root? Maybe that speed-for-accuracy optimization can be omitted on the K66.

Yes, they are Paul's version with invSqrt() and 2 iterations. somone had a benchmark comparing invSqrt and 1/sqrt, here is a run on k66 @180mhz
Code:
Computing 5000 inverse square roots using the normal sqrtf() function took 1139 microseconds.
Computing 5000 inverse square roots using the  fast qsqrtf() function took 972 microseconds.
maximum absolute error with fast sqrt was: 0.000000029802322
and occurred when computing qsqrtf(13.292902946472167).
normal sqrt was 1.1718 times slower
and the invSqrt (2 iterations) is faster than hardware float sqrt (and the divide)
 
@Paul, did you test the audioshield ? Mine are all soldered to Teensys :-(

I had that question too (with added FLASH? or RAM?). I have one here unpinned.

Started with Prop_LC for Talkie & DotStar, and to perhaps 'reflow' the Audio Tutorial to work (as it can) on the Prop_LC.
 
Yes, they are Paul's version with invSqrt() and 2 iterations. somone had a benchmark comparing invSqrt and 1/sqrt, here is a run on k66 @180mhz
Yeah, me :cool:

Ok so I guess it (just barely) makes sense to leave in the quick sqrt.
 
I now have the fastled working on the Prop shield, Had to edit two files in the library:
platform.h: Line 8
Code:
#elif defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)

likewise led_sysdefs.h: line 8
Code:
#elif defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)

For whatever reason in these files using
Code:
#elif defined(KINETISK) // Teensy 3.0 & 3.1/2 3.4 3.5
Did not work and I received compile errors on new board (as well as T3.2)

Kurt

Edit: P.S - Not sure where to delta it as the files don't appear to match what is in Paul's github project nor where his project is forked from?
 
I had that question too (with added FLASH? or RAM?). I have one here unpinned.

Yes, I tested the audio shield, but so far only playing wav files. No testing yet with SPI flash or SPI RAM.


This weekend I'm going to fix up the many issues reported over the last couple days and probably publish a third beta. Will also update the official boards.txt with lines to uncomment for the beta.

Today I have a couple other commitments, so look for this stuff late Saturday or sometime Sunday. Keep trying stuff. Seems quite a lot of broken at this moment, but hopefully starting next week we'll have things more solid.
 
Checklist

Not sure if this helps (taken from the LC thread https://forum.pjrc.com/threads/27689-Teensy-LC-Beta-Testing?p=63652&viewfull=1#post63652)

Code:
digitalWrite
digitalRead
pinMode INPUT
pinMode INPUT_PULLUP
pinMode OUTPUT
analogRead(num)
analogRead(A*)
analogRead(38) temperature
analogRead(40) bandgap ref
analogRead noise level
analogReference INTERNAL
analogReference EXTERNAL
analogReadResolution
analogWrite
analogWriteResolution
analogWriteFrequency
analogWrite DAC
IntervalTimer
tone, noTone
delay
delayMicroseconds
millis
micros
elapsedMillis
elapsedMicros
attachInterrupt
pulseIn
shiftIn
shiftOut
Serial1
Serial2
Serial3
Serial1.transmitterEnable(pin)
Serial2.transmitterEnable(pin)
Serial3.transmitterEnable(pin)
touchRead
DMAChannel
AVR emu: PORT
AVR emu: PIN
AVR emu: DDR
AVR emu: SPI registers
AVR emu: SREG
AVR emu: EIMSK
AVR eeprom_read_byte
AVR eeprom_read_word
AVR eeprom_read_dword
AVR eeprom_read_block
AVR eeprom_write_byte
AVR eeprom_write_word
AVR eeprom_write_dword
AVR eeprom_write_block
portOutputRegister
portInputRegister
portModeRegister
pgm_read_byte
pgm_read_word
pgm_read_dword
random

Keyboard.print
Mouse.move
usbMIDI.sendNoteOn

Serial.print (USB Serial)
Serial.print (USB HID)

Wire
Wire slave mode
Wire1
i2c_t3
SPI
SPI1
SPI.setCLK(14)
SPI.setMISO()
SPI.setMOSI()
SD
Ethernet W5100 chip
Ethernet W5200 chip
EEPROM
Firmata
LiquidCrystal
LiquidCrystalFast
Servo
Encoder
Keypad
SoftwareSerial
Stepper
PS2Keyboard
OneWire
IRremote
TinyGPS
Bounce
AccelStepper
SoftPWM
ShiftPWM
Time
TimeAlarms
Metro
TimerOne
TimerThree
FreqMeasure
FreqCount
NeoPixel
ILI9341_t3
OctoWS2811
Audio
FTOLED
Adafruit_CC3000
Adafruit_ILI9340
Adafruit_ILI9341
Adafruit_nRF8001
Adafruit_RA8875
Adafruit_SSD1306 I2C 128x32
Adafruit_SSD1306 I2C 128x64
Adafruit_SSD1306 SPI 128x32
Adafruit_SSD1306 SPI 128x64
Adafruit_ST7735
Adafruit_STMPE610
Adafruit_VS1053
AltSoftSerial
Artnet
CapacitiveSensor
DmxSimple
DogLcd
DS1307RTC
Entropy
FastLED
FlexiTimer2
FrequencyTimer2
ks0108
LedControl
LedDisplay
MIDI
MsTimer2
NewPing
OSC
Ping
PulsePosition
PWMServo
RadioHead
SPIFlash
ST7565
Tlc5940
UTFT
UTouch
VirtualWire
x10
OpenGLCD
SdFat
ledRings
FastCRC
 
SPI SerialFlash ListFiles OK with SPI flash on prop shield

CMT timer PWM and interrupt (IRremote pre-test) OK

speedTest
Code:
F_CPU = 180000000 Hz
1/F_CPU = 0.0056 us
The next tests are runtime compensated for overhead
  nop                       : 0.006 us
  avr gcc I/O               : 0.066 us
  Arduino digitalRead       : 0.084 us
  Arduino digitalWrite      : 0.117 us
  pinMode                   : 0.192 us
  multiply volatile byte    : 0.039 us
  divide volatile byte      : 0.049 us
  multiply volatile integer : 0.033 us
  divide volatile integer   : 0.039 us
  multiply volatile long    : 0.034 us
  multiply single float     : 0.044 us
  divide single float       : 0.109 us
  multiply double float     : 0.329 us
  divide double float       : 5.499 us
  itoa()                    : 0.274 us
  ltoa()                    : 1.199 us
  dtostrf()                 : 16.949 us
  random()                  : 0.224 us
  y |= (1<<x) with volatile : 0.027 us
  bitSet() with volatile    : 0.028 us
  analogReference()         : 0.933 us
  analogRead()              : 7.149 us
  analogWrite() PWM         : 0.709 us
  delay(1)                  : 999.999 us
 
Last edited:
@Ben : your list of things to test includes Serial1 ... Serial3, but this device also includes Serial4 and Serial5 (?) At least, the TX/RX pins for 5 serial ports are listed on the pinout.
 
TFT_ILI9163C modded for compatibility,tested and ready (is in the Teensyduino last beta but must replaced with this)
TFT_ST7735 modded for compatibility,tested and ready
gpio_MCP23S17 modded for compatibility,tested and ready
TFT_ILI93xx modded for compatibility,tested and ready
RA8875 modded for compatibility, still not tested (is in the Teensyduino last beta but must replaced with this)
OLED_pictivaWide modded for compatibility, tested and ready
All uses SPI and SPI Transactions
 
Last edited:
IRremote:
I think IRremote will work with addition of the K66 (and K64) conditionals in IRremoteInt.h probably in the zip file described in
https://www.pjrc.com/teensy/td_libs_IRremote.html

but Paul also has an out-of-date? repository at https://github.com/PaulStoffregen/Arduino-IRremote

and then there is the master repository https://github.com/z3t0/Arduino-IRremote

I changed the MK conditionals in IRremoteInt.h in the teensy zip file distribution to use defined(KINETISK), and I was able to compile and run examples for IRremote (checked with analyzer) on K66, but the library is mostly configured for a 48MHz F_BUS, so additional logic might be added for 60MHz or warnings.

I'm not sure what the official teensy IRremote distribution is.
 
@Ben : your list of things to test includes Serial1 ... Serial3, but this device also includes Serial4 and Serial5 (?) At least, the TX/RX pins for 5 serial ports are listed on the pinout.

Indeed it does have Serial#1-#5, that was the Feb 2015 T_LC beta list pulled from the thread shinji found as Paul posted it. I'm wondering if there is a K66 version in the works?

I've completed 12 hours of my 'doing other stuff burn in the K66 test' so far today, it's got another hour or so to run. LED still blinking and RND nums spitting out with the time. No smoke or high temps.

Paul - is this K66 Beta board in line with the 3.3V regulator power and other specs that you expect to evolve in the end? Obviously the CPU package will change and some test fixtures and pins/pads supplied will be gone. Not that I intend to overload it - but if I stick on a display (or two), power an ESP-8266, Flash card etc in parallel will that relate? Does the per pin power change with the CPU package?
 
What's needed (soft+hardware) to try the debug-pins ?
Edit: Someone mentioned a Teensy (LC?) as "debug-dongle" long time ago... I don't remember who it was ?
 
Last edited:
@Ben : your list of things to test includes Serial1 ... Serial3, but this device also includes Serial4 and Serial5 (?) At least, the TX/RX pins for 5 serial ports are listed on the pinout.
Fyi - I have started to hack up the Core3 files to try to add these two usarts...
 
Perhaps I can do the first steps to add 216/240MHz overclocking and full-featured FLAC-decoding during this weekend.
FastCRC is ready & tested.
 
Never mind'ish, I see the "ugly hack" in analog.c
Code:
#if defined(__MK64FX512__) || defined(__MK66FX1M0__) // ugly hack for now...
#define __MK20DX256__
#endif

Though K66/K64 don't have VREFOUT, but have bandgap on AD27 and need to set PMC_REGSC[BGBE] like LC

EDIT
: I was wrong, K66 does have VREF output, ADC1/AD18, just like teensy 3

As noted in EDIT, I was wrong. the K66 internal ADC registers (temperature,and VREF output) work just like Teensy 3. One could add internal channels to read the two DACs, ADC0/AD23 and ADC1/AD23
 
The board is nicely done.

> (i2c_t3 lib ?)

This change to i2c_t3.h helps compilation.

#if !defined(I2C_T3_H) && (defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MKL26Z64__) || defined(__MK66FX1M0__)) // 3.0/3.1/LC/3.5
 
Made some progress on Serial4 and Serial5 objects. I still need to do more testing, but simple sketch:
Code:
void setup() {
  // put your setup code here, to run once:
  delay(1000);
  Serial.begin(115200);
  delay(1000);
  Serial3.begin(115200);
  Serial4.begin(115200);
  Serial5.begin(115200);
  pinMode(13, OUTPUT);
  delay(1000);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(13, HIGH);
  Serial.println("Printing to Serial3");
  Serial3.println("Hello World 3");
  Serial.println("Printing to Serial4");
  Serial4.println("Hello World 4");
  Serial.println("Printing to Serial5");
  Serial5.println("Hello World 5");
  digitalWrite(13, LOW);
  delay(500);
}
Is at least according to my logic analyzer I am getting the correct output on the correct pins. I have not tested input yet. In case anyone wishes to take a look, I pushed a new branch up on my core fork. https://github.com/KurtE/cores/tree/Serial4-Serial5

Also Serial4 and Serial5 do not show up a KEYWORD1 objects. Not, sure how to get that to happen...
 
Status
Not open for further replies.
Back
Top