Acknowledgement button on Olimex STM32-H103

Niibe Yutaka gniibe at fsij.org
Mon Oct 28 10:20:08 CET 2019


Ardavast Dayleryan writes:
> I've never programmed anything on an STM32 before, so I guess I'm
> missing something obvious.  Can anyone help me to get on the right
> track with this?

I think that RCC setting is also needed to update.

> diff --git a/board/board-olimex-stm32-h103.h
> b/board/board-olimex-stm32-h103.h
> index 348860d..05f9b8f 100644
> --- a/board/board-olimex-stm32-h103.h
> +++ b/board/board-olimex-stm32-h103.h
> @@ -12,7 +12,7 @@
>  #define GPIO_LED_CLEAR_TO_EMIT          12
>  #define GPIO_USB_BASE   GPIOC_BASE
>  #define GPIO_USB_CLEAR_TO_ENABLE        11
> -#undef  GPIO_OTHER_BASE
> +#define GPIO_OTHER_BASE GPIOA_BASE
>
>  /*
>   * Port C setup.
> @@ -29,5 +29,9 @@
>  #define VAL_GPIO_LED_CRL            0x44888888      /*  PC7...PC0 */
>  #define VAL_GPIO_LED_CRH            0x88837888      /* PC15...PC8 */
>
> +#define VAL_GPIO_OTHER_ODR          0xFFFFFFFF
> +#define VAL_GPIO_OTHER_CRL          0x44444448      /*  PA7...PA0 */
> +#define VAL_GPIO_OTHER_CRH          0x44444444      /* PA15...PA8 */
> +
>  #define RCC_ENR_IOP_EN      RCC_APB2ENR_IOPCEN
>  #define RCC_RSTR_IOP_RST    RCC_APB2RSTR_IOPCRST

Here.  It should be:

==========================
#define RCC_ENR_IOP_EN     (RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPCEN)
#define RCC_RSTR_IOP_RST   (RCC_APB2RSTR_IOPARST | RCC_APB2RSTR_IOPCRST)
==========================

Please try.
-- 



More information about the Gnuk-users mailing list