-
Notifications
You must be signed in to change notification settings - Fork 64
[k64f] Restore GPIO functionality by enabling pins via pinmux #954
Conversation
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]>
samples/tests/GPIOInputs-k64f.js
Outdated
var pincount = testpins.length; | ||
|
||
var count = 1; | ||
var gpios = [] |
There was a problem hiding this comment.
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!"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
samples/tests/GPIOOutputs-k64f.js
Outdated
pins.D8, pins.D9, pins.D10, pins.D11, pins.D12, pins.D13, | ||
pins.D14, pins.D15]; | ||
var pincount = testpins.length; | ||
var gpios = [] |
There was a problem hiding this comment.
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]>
+1 |
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]