Sheesh! I made a dumb mistake by overlooking the overflow value to load into the TPM1 counter. I was running the full 16-bits which of course effectively divided the clock frequency by 65536.
I...
Type: Posts; User: teensy3056
Sheesh! I made a dumb mistake by overlooking the overflow value to load into the TPM1 counter. I was running the full 16-bits which of course effectively divided the clock frequency by 65536.
I...
I am trying to take in an signal via the ADC0 and send it out via TPM1. The ADC works, the TPM1, specifically the selected clock, OSCERCLK, does not.
In the following code, 3 files, the...
joepasquariello - I apologize for creating the impression that I necessarily want to override the default configuration in the Teensy core. Rather, I want to understand the starting configuration,...
Having gone through ResetHandler(), I have a good sense that doing much more tracing would be very time consuming and not necessarily useful.
From what has been said by defragster and...
I have gone through ResetHandler() in mk20dx128.c. I found it to be a good exercise to partly explain the starting configuration of the Teensy 3.6 as it enters setup().
I decided to focus on the...
Paul,
I am sure I will find such a web page useful. Thanks for spending the time to prepare it.
Thank you all. Your patience with my basic Kung Fu "Grasshopper" questions from which I will learn.
Best regards.
joepasquariello,
That is helpful, thanks, and I will examine it further.
I still have the question of what is the startup configuration of the microcontroller as setup() is called. The Teensy...
WMXZ,
Yes, I see in main.cpp what joepasquariello pointed out.
I still have the question, viz., what is the state of the Teensy 3.6, or, for that matter, any Teensy development board, as a...
joepasquariello,
Thanks for that explanation.
I am used to writing main() myself on a Windows platform with Visual Studio.
On the Teensy, since the initiating code is not obvious, can I find...
Paul,
I did not know that the code runs before setup(). Is that common for microcontrollers or just the way the Teensy 3.6 system was designed by you and your colleagues?
Where would I find...
The documents I referred to are at Kinetis Peripheral Module Quick Reference and K66 Sub-Family Reference Manual, respectively.
The code I copied from the first document is,
/*
Name: ...
This is all done on a Teensy 3.6.
I replicated a program in Kinetis Peripheral Module Quick Reference, dated May, 2014, from NXP / freescale, specifically "4.1.3.1.1 Code example and explanation"...
defragster,
Thanks for that information.
After reading your response I found a single reference to "cycle counter" in the MK66FX1M0 Manual, chapter 13. However, other than the details you...
Reading about all the clocks in the Teensy 3.6 leads me to believe that there is not a "reference clock" available for use in the microcontroller for use.
By "reference clock" I mean a clock which...
I would like to know the frequency of the asynchronous clock (ADACK) in Teensy 3.6 for use with the ADC module.
From the MK66FX1M0 Manual:
This portion of the block diagram, pdf. 954, shows the...
I made the attached table of Teensy 3.6 pin / port relationships from the schematic at the bottom of Teensy 3.6 Development Board.
Perhaps others will find it useful
This code now works when it did not originally.
/*
Name: Teensy_Test_01.ino
*/
uint8_t out = 0;
BriComp,
Is this,
27887
what you are requesting? If not, let me know what else you would like.
println also works for me in the Arduino IDE.
The code with println in it does seem to compile, even with the red underline. However, none output from any print commands, viz., print, println,...
When I try to use Serial.println in an .ino file, I get this error.
27878
I am using Visual Micro within Visual Studio 2019.
I can replace it with .printf which takes time when the...
At the bottom of the TeensyŽ 3.6 Development Board page is the board schematic.
On it are two similar looking symbols with which I am not familiar, viz.,
27869
and,
27870
joepasquariello,
Thanks for trying my code. It is always useful for another designer to test one's code so as to keep fatheadedness at bay!
No, I do not need very low frequency PWM square...
joepasquariello,
It is not so much that I want my own lower-level API. Rather, I learned from a project I did with the Arduino UNO that there is an amazing capability in these microcontrollers...
I am sorry for the confusion. It is my fault due in part to me trying to apply what I learned from working with the Arduino UNO.
That said, I was just able to get what I wanted. My post of 10:25...
The schematic at the bottom of the Teensy 3.6 Development Board shows that PTA12, ALT7 will be on pin 3 or PTB0, ALT6 will be on pin 16. Those two alternate configurations are for TPM1_CH0.
I...
joepasquariello,
I want the PWM signal from TPM1_CH0 at a pin.
Perhaps I am misreading the MK66FX1M0 microcontroller programming guide. My current understanding is that configuring the PWM for...
I found that a given channel may be on several pins. TPM1_CH0 supposedly will be on Teensy 3.6, pin 3 for port setting ALT7.
I tried the code
CORE_PIN3_CONFIG |= PORT_PCR_MUX(7) | PORT_PCR_DSE...
manitou,
Thanks for your consideration.
On pdf. 186, TPM1_CH0 is associated with PTA8 for ALT6. My understanding is that PTA8 means Port A, PCR8.
On pdf. 221, I can set register PORTA_PCR8...
I am working to better understand the Teensy 3.6 microcontroller's many hidden capabilities.
I would like to get the PWM output from TPM1, channel 0 to pin 16 of the Teensy 3.6.
In the code...
Mark & Joe,
Thank you for your posts. I had made an assumption about how SIM_SOPT2_TPMSRC(3) was to be used. I just kept circling the drain thereafter. I knew that I was missing something, but...
/*
Name: Teensy_timers_06.ino
*/
#include <kinetis.h>
#include <core_pins.h>
//*****************************************************************************
// Prototypes
//void...
Mark,
You are correct that TRMSRC is a subfield of SIM_SOPT2. However, I have also been unsuccessful is setting or changing the value of SIM_SOPT2 directly with either a
SIM_SOPT2 = value; or a...
I want to set registers directly in the microcontroller. The register names are in kinetis.h. However, when I try to set or change values, at least some of them, the original values persists.
...
Paul,
Thanks for your replies. You have provided a great deal of useful information which I will use.
Best regards.
Paul,
Thanks for your reply.
I learned a lot of DSP theory and am trying to apply some of it in practice. I did a project with an Arduino UNO in which I took the audio input from a radio,...
I cannot find anything similar to the Teensy 2.0 information for the Teensy 3.6 on the pjrc website.
At the bottom of the Teensy 3.6 page is "MK66FX1M0 Manual - All the useful peripheral...
I did not realize that since I got to that page from the TeensyŽ USB Development Board page which lists all the Teensy board varieties.
I am using a Teensy 3.6.
Where do I find the information...
I am trying to use the example code from Using Interrupts, in the section "Interrupt Service Routine Syntax". I have the two include statements in my code, viz.,
#include <avr/io.h>
#include...