In write_buffer_to_sram() write as much as possible with write_mem32