TEENSY 4.0 Configure Pinning for different use cases

Status
Not open for further replies.
Dear all,

For a project I am looking into using certain pins for different functionality, this is for Teensy 4.0. What are the best steps to see if the new configuration of pins is not conflicting with other configurations already used in the Arduino environment? I found on the NXP page the tool "Config Tool i.MX Version 7.0".

The following use case is envisioned

  1. use a Quadtimer, TMR0 to trigger both ADCs synchronically.
  2. use EMC_04 (F2) as input, when it triggers, capture the Quadtimer counter value
  3. use EMC_05 (G5) as input, when it triggers, capture the Quadtimer counter value

When I use the Config Tool the functionalities/connections are available, but not sure if they interfere with other already used default settings.

The above is just an example, but I would like to understand what approaches are used by the community.

THanks,
 
Hi, this one is sort of hard to answer, so take all of this with a grain of salt.

I have not used the NXP tools, so I don't know what all it does or does not do.

However the pins you mention: Like EMC 4 and EMC 5: if I go to my excel document I see these are pins 2 and 3 on the T4 (and T4.1)
Code:
 2	EMC_04	4.4				PWM4_A2		2:TX_DATA	IO-06	1:4		
 3	EMC_05	4.5				PWM4_B2		2:TX_SYNC	IO-07	1:5
So there are both on the same PWM module 4 and sub-module 2.

There are some examples on trying to capture input on these pins. You can look into the FreqMeasureMulti library for some code that does capture inputs on these pins.

A few months ago I was trying to help out and get the ADC library ported over to work with the T4 (and now T4.1). There was some code that a few of us did, to allow a timer (or two) depending on both ADC channels were use. If I remember correctly I used Qtimers to do this Again the code is in the ADC library.

But more or less the T4 (actually all Teensy) boards are pretty much a blank canvas. Yes there is code that will initialize all of the timers that can be used for PWM to some initial state. But all of the registers are complete exposed to you. They are defined in the imxrt.h file that is part of the core.

Most everything is described in the imxrt reference documents, that you can download from the pjrc site: https://www.pjrc.com/teensy/datasheets.html

Also all of the code is installed in the core files, so you can always take a look at how things are done, and change if need be, or write your own code to update or view any of the registers.

Obviously if you change something like how some of the system clocks are defined, it could have repercussion on other code that uses the same clocks. You can see some of these relationships in the clock tree which is in chapter 13 of the PDF.

Good luck, hope this helps a little.

Kurt
 
Thanks @KurtE for the response above.

I indeed found some examples that use a Quadtimer to start ADC and currently I am altering those to also capture the input transition. I saw that the functions on the pins are available, only I did not know if the Teensy has a full crossbar/xbar, meaning that if I select one option at one pin another option at another pin disappears because of the setting of the xbar. Reading your story I assume this is not the case and Teensy 4.0 is very flexible in this respect.

I appreciate the quick reply!
 
Status
Not open for further replies.
Back
Top