Big capacitor near microcontroller - Circuit stops working

Off the top of my head, I think you're just using way more power supply than you need.

You have a switch mode regulator that can switch 2.5 amps powering a 3.3 volt circuit drawing a few milliamps or so.

And, to make it's life hard, you have a 330 uf capacitor on there too.

Add some resistive load. Make that regulator do at least a little work. That should also reduce the ripple on the 3.3 volt output.

"It stops working long time after the capacitor charges completelly... It has a ripple noise of around 100mV... There are also some 300mV spikes.."

See what's happening? When the regulator sees the voltage start to drop, it turns it's switch on and drives current through the output inductor. It can't just switch to a smaller switch when there's virtually no load on the output. The result is excessive ripple on the output. It's like using a firehose to fill a drinking glass.

Even though... it SHOULD be able to handle it better. I gotta wonder how far away from the regulator the circuit is, and if you have a large capacitor (330 uf or so) at the regulator as well.

The worst possible set up is the regulator more than a few feet away, with no output cap, and then the 330 uf cap right at the CPU.