0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

STM32G031とVSCoed、計3ポート(PA11,PA12,PB7)でナイトライダー

Last updated at Posted at 2021-12-05

x 過去ログを見よ->

x cubemxではstm32g0316-discoを選択
x VSCでnecleo-g031を選択(visual studio code)
x 動けば正義、細かい事を気にするな
x STM32G031J6M6との違い、ピン数

stm32g031_11_12_b7_1内をいろいろ適当にコピー

o_con130.jpg

B8B04B3A-BCC7-4C46-8531-0A97761355EF.jpeg



    //b7    
    HAL_GPIO_WritePin(GPIOB, GPIO_PIN_7, GPIO_PIN_RESET);
    HAL_Delay(500);

    HAL_GPIO_WritePin(GPIOB, GPIO_PIN_7, GPIO_PIN_SET);
    HAL_Delay(500);

    //11
    HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11, GPIO_PIN_RESET);
    HAL_Delay(500);

    HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11, GPIO_PIN_SET);
    HAL_Delay(500);

    //12
    HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET);
    HAL_Delay(500);

    HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_SET);
    HAL_Delay(500);




0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?