This is brilliant advice and well worth the little effort required. Get the code it will then at least point you in the right direction.
Do not go out and buy an ECU just yet....because you simply may not need one!
Have you looked at the link that rubbersidedown posted ?
It is extremely rare to have a fault with the ecu but it does happen.
On my gen I the ecu got smoked...literally made a loud pop and opened up a split 5" long and poured out clouds of smoke. True story and I still have the ecu to either show people or even post pics if need be.
My problem was an internal short within the ecu (very rare occurrence). I purchased another couple of ecu's (yes I have 3 of them now) just in case.
Bike runs better than ever now.
But this info is just that...information and most likely useless in your case because I could almost guarantee that your problem is nothing like mine. Mine was very extreme indeed.
ps. no codes came up on my busa simply because there was no time ...happened instantly.....
Best you get those codes asap and go from there.
You will find plenty of very useful info on this forum.....
Have you located the connector and used a piece of thin wire to extract the codes from your bikes display?
Let me know if you get stuck and I can help you find pics of exactly what you need to do!
Hope you get it sorted soon.