MKE04Z8VFK4(R): How can I configure a pin for a specific function?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MKE04Z8VFK4(R): How can I configure a pin for a specific function?

517 Views
chufnagel
Contributor I

MKE04Z8VFK4(R): How can I configure a pin for a specific function? E.g. the pin PTB2 functions defaultwise as ADC0_SE6. How can I configure this pin to work as the alternatives listed in the table in the manual, e.g. as ACMP0_IN0? And is it possible to set the pin PTB5 as FTM2_CH5 output?

Iam using the FRDM-KE04Z developement board.

Thank you for helping with this issue.

0 Kudos
3 Replies

409 Views
chufnagel
Contributor I

Hi Mark,

thank you very much! Are the priorities listed somewhere in the manual?

Kind regards

Chris

0 Kudos

409 Views
mjbcswitzerland
Specialist V

Chris

In fact the KE04 user's manual informs that the peripheral mode has priority over GPIO mode, and also that analog functions have priority over peripheral modes but doesn't actually state anything about priorities when multiple peripherals are on the same pin.

KE02 however explicitly states the priority scheme:

pastedImage_1.png

pastedImage_2.png

I assumed all KE and KEA parts used the same priority control but maybe they can collide on the KE04(?).
However if one simply avoids trying to use multiple peripherals on a single pin it doesn't really matter whether it automates the selection or not.
Since the user's manual doesn't specifically state it this would indeed be the strategy to follow until it is possibly proven by practical tests.

Regards

Mark

0 Kudos

409 Views
mjbcswitzerland
Specialist V

Hi

The pins are controlled differently in the KE parts to other Kinetis types. If you enable FTM2_CH5 operation in the timer module it will automatically connect it to the pin.

Each pins has a list of possible functions and priorities. If two or more such modules enables a function using the pin, the module /pin assignment with highest priority will be connected.

In some cases a pin function can be controlled to be on one of multiple pins - this is controlled in the SIM_PINSELx registers - one example: UART2_TX can be on PTI1 or PTD7 depending on the bit 0x00002000 in SIM_PINSEL1 and it will be connected when the UART2 Tx is enabled (as long as another module using the same pin doesn't have a higher priority).

Regards

Mark

http://www.utasker.com/kinetis/FRDM-KE02Z.html
http://www.utasker.com/kinetis/FRDM-KE02Z40M.html
http://www.utasker.com/kinetis/FRDM-KE04Z.html
http://www.utasker.com/kinetis/FRDM-KE06Z.html
http://www.utasker.com/kinetis/TRK-KEA8.html
http://www.utasker.com/kinetis/TRK-KEA64.html
http://www.utasker.com/kinetis/TRK-KEA128.html
http://www.utasker.com/kinetis/FRDM-KEAZN32Q64.html
http://www.utasker.com/kinetis/FRDM-KEAZ64Q64.html
http://www.utasker.com/kinetis/FRDM-KEAZ128Q80.html

0 Kudos