Quantized Hall effect in 3D periodic systems