查STMF103 DS,大部分引脚输入电压范围为:VSS−0.3 至 VDD+0.3,对VDD=3.3V,IO输入不宜超过3.6V.(注意STMF103有部分IO支持5V输入.)
Output high level voltage for an I/O pin when 8 pins are sourced at same time:VDD–1.3,对VDD=3.3V,IO输出高电平不低于2.0V
查74LS164资料,Input HIGH Voltage min=2.0.
所以74LS164和STMF103完全可以直连.