The thing is with my cos when im driving it it just cuts out

then the rev counter flies to 7000rpm then down. When i go to start it back up it sometimes back fires and smokes like mad but will not tick over the only way i can get it to run again is to unplug the ecu and connnect it again any thoughts of what this could be cheers in advance bri