---
title: "Please tell me how to check the operation of SURF5."
url: "https://maker.wiznet.io/forum/15610"
markdown_url: "https://maker.wiznet.io/forum/15610/md"
type: "Forum topic"
category: "MCU & Boards"
author: "qtsn64"
created: "2025-02-25T17:36:18+09:00"
last_activity: "2025-02-27T17:57:11+09:00"
language: "en"
views: 5
replies: 4
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Please tell me how to check the operation of SURF5.

## Question

Asked by qtsn64 on 2025-02-25 in MCU & Boards.

I recently purchased SURF5.

I have installed all the necessary tools such as drivers, ISP tools, and VSCode according to the user guide.

I built in VSCode to run GPIO_Interrupt of W7500x_StdPeriph_Examples, and downloaded the created GPIO_Interrupt.bin with the ISP tool, but it doesn't seem to be working.

I think GPIO_Interrupt is a program to light up the LED, but it does not light up.

At the time of download with the ISP tool, "Download completed" is displayed, so I think there is no problem with the download. Is there any possible cause?

Also, if there was a mistake in the operation check method, could you please tell me the correct method?

Thank you in advance.

## Replies

### Reply 1 by qtsn64, 2025-02-25

I confirmed in the circuit diagram that the LED is connected to the 8th pin (PC_15).

I have confirmed that it is set to GPIOC, GPIO_Pin_15 in GPIO_Interrupt, so I believe it is connected to the appropriate GPIO pin.

Can the LED connected to PC_15 be lit even if the power is supplied by USB power supply instead of PoE power supply?

Also, is there a way to visually check whether it is in boot mode or the program is running?

### Reply 2 by TheoIm, 2025-02-27

Hello, First, check if printf outputs correctly when initializing the Surf 5 for the first time. If UART data is printed through printf, the issue is likely related to GPIO initialization. Please provide the code.

### Reply 3 by qtsn64, 2025-02-27 (in reply to reply 2)

Hello. Thank you for your response.
Here is the code. Since I just want to light up the LED, I have disabled the interrupt-related processing. Other than this, I am using the "W7500x-StdPeriph_Examples" as it is.

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

/* Includes ------------------------------------------------------------------*/
#include "main.h"

/** @addtogroup W7500x_StdPeriph_Examples
* @{
*/

/** @addtogroup GPIO_Interrupt
* @{
*/
/* Private function prototypes -----------------------------------------------*/
static void UART_Config(void);
static void GPIO_Config(void);

/* Private functions ---------------------------------------------------------*/

/**
* @brief Main program.
* @param None
* @retval None
*/
int main(void)
{
SystemInit();

UART_Config();
GPIO_Config();

printf("W7500x Standard Peripheral Library version : %d.%d.%d\r\n", __W7500X_STDPERIPH_VERSION_MAIN, __W7500X_STDPERIPH_VERSION_SUB1, __W7500X_STDPERIPH_VERSION_SUB2);

printf("SourceClock : %d\r\n", (int) GetSourceClock());
printf("SystemClock : %d\r\n", (int) GetSystemClock());

printf("System Loop Start\r\n");

GPIO_SetBits(GPIOC, GPIO_Pin_15);
while (1) {
GPIO_ResetBits(GPIOC, GPIO_Pin_15);
for(int i=0; i &lt; 1000000; i++);
GPIO_SetBits(GPIOC, GPIO_Pin_15);
}

return 0;
}

/**
* @brief Configures the UART Peripheral.
* @note
* @param None
* @retval None
*/
static void UART_Config(void)
{
UART_InitTypeDef UART_InitStructure;

UART_StructInit(&UART_InitStructure);

#if defined (USE_WIZWIKI_W7500_EVAL)
UART_Init(UART1, &UART_InitStructure);
UART_Cmd(UART1, ENABLE);
#else
S_UART_Init(115200);
S_UART_Cmd(ENABLE);
#endif
}

/**
* @brief Configures the GPIO Peripheral.
* @note
* @param None
* @retval None
*/
static void GPIO_Config(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
//GPIO_ITInitTypeDef GPIO_ITInitStructure;
//NVIC_InitTypeDef NVIC_InitStructure;

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15;
GPIO_InitStructure.GPIO_Direction = GPIO_Direction_OUT;
GPIO_InitStructure.GPIO_Pad = GPIO_OpenDrainDisable | GPIO_HighDrivingStrength | GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_AF = PAD_AF1;
GPIO_Init(GPIOC, &GPIO_InitStructure);

GPIO_SetBits(GPIOC, GPIO_Pin_15);

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;
GPIO_InitStructure.GPIO_Direction = GPIO_Direction_IN;
GPIO_InitStructure.GPIO_Pad = GPIO_InputBufferEnable | GPIO_CMOS | GPIO_PuPd_UP;
GPIO_InitStructure.GPIO_AF = PAD_AF1;
GPIO_Init(GPIOC, &GPIO_InitStructure);

/*GPIO_ITInitStructure.GPIO_IT_Pin = GPIO_Pin_4;
GPIO_ITInitStructure.GPIO_IT_Polarity = GPIO_IT_HighRising;
GPIO_ITInitStructure.GPIO_IT_Type = GPIO_IT_Edge;
GPIO_IT_Init(GPIOC, &GPIO_ITInitStructure);
GPIO_ITConfig(GPIOC, GPIO_Pin_4, ENABLE);

NVIC_InitStructure.NVIC_IRQChannel = PORT2_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPriority = 0x0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);*/
}

#ifdef USE_FULL_ASSERT

/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t* file, uint32_t line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

/* Infinite loop */
while (1)
{
}
}
#endif

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Firstly, when I initialize SURF5, Printf does not output anything. I am using Teraterm as the serial console for output. I have checked the serial port settings such as baud rate, and there seems to be no mistake.
Since Printf does not output anything, I suspect that the binary file generated after the build might be abnormal. For example, when I compared the binary files of UART_Printf.bin and GPIO_Interrupt.bin, their contents were exactly the same.
If you have any insights based on this information, I would appreciate it if you could let me know.

### Reply 4 by qtsn64, 2025-02-27 (in reply to reply 2)

Hello. I apologize for posting again so soon, but I was struggling so much that I switched my development environment from VSCode to Keil, and it resolved the issue.
Although I followed the steps for VSCode as stated on WIZnet's official website, I still don't know what settings were wrong...

---

Source: https://maker.wiznet.io/forum/15610
