cancel
Showing results for 
Search instead for 
Did you mean: 

Toogle Pins for STM32MP157C-DK2

HHass.1102
Associate II

Hello,

I am working on the evaluation board STM32MP157CDk2

I am trying to add my code in the main method while loop in order to toogle pins.

I added the following code:

while (1)
  {
    /* USER CODE END WHILE */
	  HAL_GPIO_TogglePin(atoi(1), GPIO_PIN_11);
	  HAL_Delay(100);
	  HAL_GPIO_TogglePin(atoi(0), GPIO_PIN_11);
    /* USER CODE BEGIN 3 */
  }
  /* USER CODE END 3 */

I have two questions.

1) I get the following error (attached) after i choose target and then program chip

2) I am connected through usb and UART in the eclipe, am using the system work bench as an IDE. Is there something to do before doing the build for connecting with the device in a special way?. I can see in the console that i am connected to the board. and Eclipse shows the message at the buttom (Serial Console in use).

I am new to this. I appreciate your help alot

Best Regards

12 REPLIES 12
HHass.1102
Associate II

I tried it like that:

while (1)
  {
    /* USER CODE END WHILE */
	  HAL_GPIO_TogglePin(GPIOH, GPIO_PIN_11);
	  	  HAL_Delay(500);
    /* USER CODE BEGIN 3 */
  }
  /* USER CODE END 3 */

the blinking LED's i have are green for LED2,4,3 and blue for LED8

Opps, I meant GPIO_PIN_7. Sorry about that.

By the way, did you set the GPIO as output?

HHass.1102
Associate II

No, how to do that?