If a switch doesn't receive a BPDU on a particular port it marks this port as "Edge Port". But any designated port won't receive any BPDU even though it was connected to other switches since their connected ports would be blocking. How does a switch find out if it is connected to an end-device or a switch in blocking state?.
The switch determines this during the listening phase. If no BPDUs are received during the listening phase, the switch knows it's an edge port.