Giter Club home page Giter Club logo

Comments (10)

gl-sergei avatar gl-sergei commented on June 13, 2024 1

If you compiling with TARGET=BLUE_PILL, then try to change these two lines: https://github.com/gl-sergei/chopstx/blob/984116b3b64b93f5a9e315f8a805db74f22fb90b/board/board-blue-pill.h#L12

Ideally, you should prepare header file for your board and add makefile target.

BTW, which board are you trying to run it on?

from u2f-token.

gl-sergei avatar gl-sergei commented on June 13, 2024 1

I happened to have this board. Just tested it, it works with these changes:

diff --git i/board/board-blue-pill.h w/board/board-blue-pill.h
index 68843d7..8fe4fe9 100644
--- i/board/board-blue-pill.h
+++ w/board/board-blue-pill.h
@@ -9,8 +9,8 @@
 #define STM32_PLLMUL_VALUE              9
 #define STM32_HSECLK                    8000000
 
-#define GPIO_LED_BASE   GPIOC_BASE
-#define GPIO_LED_CLEAR_TO_EMIT          13
+#define GPIO_LED_BASE   GPIOB_BASE
+#define GPIO_LED_CLEAR_TO_EMIT          12
 #define GPIO_USB_BASE   GPIOA_BASE
 #define GPIO_USB_SET_TO_ENABLE          12
 #undef  GPIO_OTHER_BASE
@@ -29,8 +29,8 @@
 #define VAL_GPIO_USB_CRH            0x88811888      /* PA15...PA8 */
 
 #define VAL_GPIO_LED_ODR            0xFFFFFFFF
-#define VAL_GPIO_LED_CRL            0x88888888      /*  PC7...PC0 */
-#define VAL_GPIO_LED_CRH            0x88388888      /* PC15...PC8 */
+#define VAL_GPIO_LED_CRL            0x88888888      /*  PB7...PB0 */
+#define VAL_GPIO_LED_CRH            0x88838888      /* PB15...PB8 */
 
-#define RCC_ENR_IOP_EN      (RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPCEN)
+#define RCC_ENR_IOP_EN      (RCC_APB2ENR_IOPBEN | RCC_APB2ENR_IOPCEN)
 #define RCC_RSTR_IOP_RST    (RCC_APB2RSTR_IOPARST | RCC_APB2RSTR_IOPCRST)

Make sure to run

make clean distclean && make TARGET=BLUE_PILL

after applying the patch.

Please also note that since your board does not have a push button to check for user presence, firmware will allow register/authenticate only within 10 seconds after device has been plugged in. You'll probably need to unplug the device and plug it back (or press HW reset button) to authenticate.

from u2f-token.

assasinfil avatar assasinfil commented on June 13, 2024

I work witch stm32f103c6 and led pin is PB12. I for a long time could not understand why the standard example blink does not work and having looked closely to the board I saw that the LED is connected to the foot of pb12

from u2f-token.

assasinfil avatar assasinfil commented on June 13, 2024

The LED should do some kind of work?

from u2f-token.

gl-sergei avatar gl-sergei commented on June 13, 2024

For PB12 it should look like

#define GPIO_LED_BASE   GPIOB_BASE
#define GPIO_LED_CLEAR_TO_EMIT          12

and probably this line needs to be changed to something like

#define VAL_GPIO_LED_CRH            0x88838888      /* PB15...PB8 */

LED will blink when you plug the board and it will blink each time board communicates via USB.

from u2f-token.

assasinfil avatar assasinfil commented on June 13, 2024

i changed, but led didn't work((
maybe need change all lines?
#define VAL_GPIO_LED_ODR 0xFFFFFFFF
#define VAL_GPIO_LED_CRL 0x88888888 /* PC7...PC0 */

from u2f-token.

assasinfil avatar assasinfil commented on June 13, 2024

stm32f103_hcdvbd0033_pinout

from u2f-token.

assasinfil avatar assasinfil commented on June 13, 2024

Nice its work! pls add it to compiler (Target=DARK_PILL)

from u2f-token.

assasinfil avatar assasinfil commented on June 13, 2024

The last question: where do I connect the button for authorization?

from u2f-token.

gl-sergei avatar gl-sergei commented on June 13, 2024

First, you will need to solder a push button. Then, you will need to modify pbt.c to read events on this button's GPIO PIN and probably board-blue-pill.h as well, to initialise that GPIO PIN.

For new makefile target I created #10

from u2f-token.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.