Formation mechanisms and phase stability of solid-state grown cspbi3 perovskites