cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with GPIO.

FRest.1
Associate III

I'm working with the NUCLEO-WL55jc1 board and I have one strange behavior. I need one output pin and I've called it Trigger.

Initially, the pin PC2 was used but I wasn't able to make it work. It had incorrect output voltages and some bounce like it was a switch.

Other pins, like LEDs on the board, worked as aspected, so I decided to change the pin with PB1, using the same software: it was working.

In order to investigate, I've used both outputs, the same software, just a set, and a reset after delay. I've connected the oscilloscope to see the output signal reported in the picture.

Tack yellow is the PB1 output (Trigger_pin), track blue is the PC2 output (Test_pin) the wrong one.

0693W00000DpxlKQAR.png 

My simple code.

uint16_t Distance(void) {
 
	uint16_t distanza = 0;
 
	UTIL_LPM_Mode_t lpm_stat = UTIL_LPM_GetMode();
//	UTIL_LPM_S
	APP_LOG(TS_OFF, VLEVEL_H, "\r\n###### ========== PASSO ==========, %d\r\n", lpm_stat);
	BSP_LED_On(LED_BLUE) ;
	HAL_GPIO_WritePin(Trigger_GPIO_Port, Trigger_Pin, GPIO_PIN_SET);
	#ifdef TEST_GPIO
	HAL_GPIO_WritePin(Test_GPIO_Port, Test_Pin, GPIO_PIN_SET);
	#endif
	HAL_Delay(10);
	BSP_LED_Off(LED_BLUE);
	HAL_GPIO_WritePin(Trigger_GPIO_Port, Trigger_Pin, GPIO_PIN_RESET);
	#ifdef TEST_GPIO
	HAL_GPIO_WritePin(Test_GPIO_Port, Test_Pin, GPIO_PIN_RESET);
	#endif
 

Now, PC2 doesn't seem used on the NUCLEO board it's free, so my question: I've done a mistake o there is some sort of bugs on the board?

F.

1 ACCEPTED SOLUTION

Accepted Solutions
FRest.1
Associate III

I'm very sorry, I've wasted your time. I've made a mistake counting the PIN on the connector in reverse and wrong order so I was looking at the wrong pin.

What's worse is that I foolishly persevered.

My apologies and thank you for the help, it helped force me to revisit the connections.

F.

View solution in original post

5 REPLIES 5
FRest.1
Associate III

There is activity on PC2, but I'm not able to check what is controlling it.

F.

TDK
Guru

PC2 is not used per the user manual or the schematic. Recheck wiring, pin/port definitions. Gotta be an answer somewhere. Examine register values.

If you feel a post has answered your question, please click "Accept as Solution".
Javier1
Principal

Maybe PC2 is declared as open drain? and what you see is the noise of the line being left floating?

we dont need to firmware by ourselves, lets talk
FRest.1
Associate III

I'm very sorry, I've wasted your time. I've made a mistake counting the PIN on the connector in reverse and wrong order so I was looking at the wrong pin.

What's worse is that I foolishly persevered.

My apologies and thank you for the help, it helped force me to revisit the connections.

F.

happens to the best of us

we dont need to firmware by ourselves, lets talk