Unplugging the battery is a way to force the fuel trims to relearn, doing a partial pcm write will not do this unless you check the box for reset fuel trims? I don't believe the timing tables themselves do learn or adapt, there are tables that adjust the timing based on other conditions on the fly. The fuel trims would adjust to some extent if there was a fuel change, other tables may be slightly adjusted because of that. It usually takes 20-30 minutes of various driving to get the fuel trims to re-learn after you do a reset. I would be absolutely sure you aren't getting knock, you need to be logging.