F3's flash interface is actually quite different, don't try and force sharing code that isn't really related. The "PGERR" is a very different bit than the parallelism error that f2/4/7 have.