Forum Rule: Always post complete source code & details to reproduce any issue!
-
-
Senior Member+
Yes we use it all the time... just use Arduino ? Or at least take a look at the sourcecode?
-
Senior Member+
I think it’s mainly to ease people’s life that Paul created the Teensyduino plugin for the Arduino IDE. The Teensyduino core files handle (among others) the boot process and the startup hardware configuration. Since these are automatically included during compilation, Teensy users never struggle with x-tal oscillator startup problems, they simply select the desired CPU speed (and USB configuration) in the IDE’s menu and that’s it.
Since there is excellent Teensy support for the widespread Arduino IDE (and for Eclipse, PlatformIO, VisualCode), why would one struggle with a bare metal approach in an unsupported environment like MCUXpresso?
-
Senior Member
NXP's documentation is littered with wrong info, essentially copy-and-paste errors from other chips.
The KL26 chips do indeed have the internal capacitors.
And just to echo what Frank and Thierry already said, you can find working code in Teensyduino's core library. We know this code works well. It's been used by many thousands of people.
You really should not expect anyone here to thoroughly review your ground-up bare metal code.
-
Thanks to all of you for your input.
Ow I did not expect this about the NXP docs...
My plan is to use the Teensy LC HW as a starting point to learn ARM and the other NXP MCUs (not only the MKL26Z64) this is why I am pushing to use the MCUExpresso 
I checked the Core Library but was not able to locate where the Clock Init is done in the TeensyLC (I think it was in the Teensy3 folder).
Can you point me to a more specific location?
Also, how did you generate that clock/caps
Thanks in advance!
-
Senior Member+
With a quick global (search of) TeensyDuino installed source files in ...\hardware\teensy\avr\cores\teensy3\kinetis.h this comes up:
Code:
#elif (F_CPU == 48000000)
// ...
#elif (F_CPU == 24000000)
//...
Perhaps that will lead to desired answers in ...\hardware\teensy\avr\cores\teensy3\mk20dx128.c:
Code:
#elif F_CPU == 48000000
// ...
#elif F_CPU == 24000000
// …
Compared to the SDK - everything here is single minded and functional and refined to get the Teensy up and running for a defined environment.
If you want an idea of what it takes to get one of these things running read Paul's scattered Teensy4 NXP 1052 - and current Beta - posts that go back some 14+ months when it was sitting on his desk - he got Beta boards out some 5-6 weeks ago - and those boards have a mix of caps on the crystals to test the best doc's he could get under NDA and after. Development is ongoing with 9 releases of software updates and hardware revs yet to come.
Last edited by defragster; 02-11-2019 at 08:43 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules