Find "core pin" based on pin name in datasheet?

Status
Not open for further replies.

JanWagner

Member
Hi, sorry if this has been asked before, searched but couldn't find.

Starting from Teensy LC processor's datasheet (https://www.pjrc.com/teensy/KL26P64M48SF5.pdf) under "5.1 KL26 Signal Multiplexing and Pin Assignments" it says QFN48 package pin 33 and 39, names PTC0 and PTC6, have as ALT3 function one signal I'm interested in.

Now that I know to use either PTC0 or PTC6, I'd like to set CORE_PIN<what?>_CONFIG PORT_PCR_MUX(3) to chose ALT3.

How can I look up the "core pin" number of PTC0? Are they also somewhere in the datasheet?

I already searched existing headers for PTC0. A hit in SPIFIFO.h suggests pin is 15. Where does this 15 come from? In addition this search hit chooses PORT_PCR_MUX(2), but ALT2 according to the datasheet has no function. That means SPIFIFO.h is perhaps not correct for Teensy LC (__MKL26Z64__). What is a more reliable way to figure out the "core pin"?
 
Mux is done by port and controled by PORTx_PCRn where x is the port name (A,B,C...) and n the "logical" pin (0..31) number, so PTC0 use PORTC_PCRN0 register.

Better use reference manual than datasheet, it explain all in detail, in this case this is KL26P121M48SF4RM document on NXP website (requires registration).
You can also use Kinetis expert tool as an helper even if you don't use NXP SDK, it helps a lot to check conflicts and clock tree.
 
Muxes of ports controlled by respective PORTx_PCRn, and then the schematic, thanks, those infos were very helpful! Figured out the "lookup" now.

Also came across https://mcuxpresso.nxp.com/en/pins

That web app allows pin and pin function assignment and has code generation (well not Teensyduino style directly but still good reference). The web app made the datasheet table unnecessary :)
 
Status
Not open for further replies.
Back
Top