yes pin 8 is input.I added 2 lines to check : while(!((GPIOB->IDR) & GPIO_IDR_ID8)){
check++;
} and the variable check is increase which means the problem is the IDR don't get "1" value at all..
I'm trying to generate pulse for ultra-sonic distance sensor(HC-SR04) and it works. its calculate distance by counting the pulse width time. in my case pin 9 should send a pulse from the stm32 and pin 8 ( input) should get his "1" from the sensor -...
thank you for the answer.I don't realize you proper.are you saying that the problem is pin configuration? that's why the while condition not working?I'm pretty sure the pins configuration is ok because I copied this code from a working project.