[Gnuk-users] Nitrokey support in Gnuk-1.1.x

NIIBE Yutaka gniibe at fsij.org
Fri Sep 4 08:35:49 UTC 2015


On 08/27/2015 08:58 AM, Mateusz Zalega wrote:
> Thanks! It started working after I added RCC_APB2ENR_AFIOEN. I attached
> both chopstx board and GNUK_USB_DEVICE_ID patches. The board name was
> changed before it has been put into production.

The patch applied.  I fixed the BOARD_ID by generating:

  $ echo -n "NITROKEY-START" | sha256sum | sed -e 's/^.*\(........\)  -$/\1/'

Besides, I think that it is better for using starndard usage for NeuG
for analog inputs.

Is it OK for you to apply following change?

The reason why FST-01 use AN0 and AN9 for analog inputs is some users
of FST-01 connect PA2 to consumer infra red module and AN1 is not
available.  If AN0 and AN1 (of Part A) are available, it is
recommended to use those pins for NeuG.


diff --git a/board/board-nitrokey-start.h b/board/board-nitrokey-start.h
index 996c603..ef37f6d 100644
--- a/board/board-nitrokey-start.h
+++ b/board/board-nitrokey-start.h
@@ -15,8 +15,8 @@

 /*
  * Port A setup.
- * PA0 - input with pull-up (TIM2_CH1): AN0 for NeuG
- * PA1 - floating input
+ * PA0 - input with pull-up: AN0 for NeuG
+ * PA1 - input with pull-up: AN1 for NeuG
  * PA2 - floating input
  * PA3 - floating input
  * PA4 - floating input
@@ -37,14 +37,13 @@
  * PA14 - input with pull-up.
  * PA15 - Push pull output   (USB 1:ON 0:OFF)
  */
-#define VAL_GPIO_USB_ODR            0xFFFFE7FD
-#define VAL_GPIO_USB_CRL            0x34444448      /*  PA7...PA0 */
+#define VAL_GPIO_USB_ODR            0xFFFFE7FF
+#define VAL_GPIO_USB_CRL            0x34444488      /*  PA7...PA0 */
 #define VAL_GPIO_USB_CRH            0x38811444      /* PA15...PA8 */

 /*
  * Port B setup.
  * PB0  - Push pull output   (LED2 1:ON 0:OFF)
- * PB1  - input with pull-up: AN9 for NeuG
  * ------------------------ Default
  * PBx  - input with pull-up.
  */
-- 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/gnuk-users/attachments/20150904/46326eb5/attachment.sig>


More information about the gnuk-users mailing list