They're sharpened sticks, to block charging mounts. Like from Conan the Barbarian:



Archers and other defenders can take cover behind the short walls without fear of charge attacks.