so i'm having a similar problem. 91 crx with a b16 swap. have always had the CEL come on...only comes on once car is warmed up...THOUGHT it was the vtec solenoid code, but vtec worked, and had no adverse affects that i could tell, so i never messed with it. well just recently it developed a new trick of having horrible "sputtering" basically, and wouldnt' rev past 3250, but i could go to that rpm in each gear. it got progressively worse (from doing it some of the time) to then completly dying as soon as it was started. throwing code 23 and 4, knock sensor and crankshaft position sensor. replaced plugs/wires/rotor/cap first, becuase i knew how and wanted to try it, still did the same thing....got a new distributor in. turns out the guy who did my swap, used...a im not sure distributor. but only the top bolt was holding it on, one bolt position had a...metal strap on it, to hold the bolt, but wasn't tight. turns out this is likely why it leaked some oil from that location....
Seems to work ok now. drove a half hour and it worked. my CEL still comes on, and throws the same codes, 4 and 23, but didn't experience the sputtering like before. this is really long, and may need its own thread, but i hadn't found anyone else with the same "3250" rpm problems. thanks in advance!