[fix] unknown bug, must use 0x40 instead of pgsize when writing flash