Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

[k64f] Restore GPIO functionality by enabling pins via pinmux #954

Merged
merged 2 commits into from
Apr 3, 2017

Conversation

grgustaf
Copy link
Contributor

Zephyr defaults changed around January for this board to no longer
set GPIO as default pinmux state for any of the external pins. So we
need to override them ourselves. Eventually we may need to get fancier
to set pinmux based on what the user's script wants to use the pins
for, or set up a default "ABI" for pinmux settings for the board. The
pinmux must be set up at board initialization time apparently.

Add new zjs_pinmux.c (currently for k64f only) to configure the
pinmux settings at initialization time.

Add a new prj.conf to enable GPIO port "D".

Add new samples GPIOInputs-k64.js and GPIOOutputs-k64.js to quickly
demonstrate which pins are functional.

With this update, pins D14 and D15 work as outputs for the first time.
But pin D8 on my rev E3 board doesn't seem to work as either anymore.

Fixes #514 and lets us finally see that #665 really was resolved.

Signed-off-by: Geoff Gustafson [email protected]

Zephyr defaults changed around January for this board to no longer
set GPIO as default pinmux state for any of the external pins. So we
need to override them ourselves. Eventually we may need to get fancier
to set pinmux based on what the user's script wants to use the pins
for, or set up a default "ABI" for pinmux settings for the board. The
pinmux must be set up at board initialization time apparently.

Add new zjs_pinmux.c (currently for k64f only) to configure the
pinmux settings at initialization time.

Add a new prj.conf to enable GPIO port "D".

Add new samples GPIOInputs-k64.js and GPIOOutputs-k64.js to quickly
demonstrate which pins are functional.

With this update, pins D14 and D15 work as outputs for the first time.
But pin D8 on my rev E3 board doesn't seem to work as either anymore.

Fixes intel#514 and lets us finally see that intel#665 really was resolved.

Signed-off-by: Geoff Gustafson <[email protected]>
var pincount = testpins.length;

var count = 1;
var gpios = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing ;


console.log("Test external GPIOs as outputs...");

console.log("\nWire D0 to each of D1-D15 in turn!");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you put the \n in the end of the print above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but I think this is better - this is an 'extra' newline for a blank line; console.log already puts a newline. If I put it at the end it would look more like a normal newline.

pins.D8, pins.D9, pins.D10, pins.D11, pins.D12, pins.D13,
pins.D14, pins.D15];
var pincount = testpins.length;
var gpios = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing ;

Signed-off-by: Geoff Gustafson <[email protected]>
@jimmy-huang
Copy link
Contributor

+1

@jimmy-huang jimmy-huang merged commit 9e12add into intel:master Apr 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

D0 and D1 cannot be used as output pins on FRDM_K64F
2 participants