> I am using the nxp lpc845 for an embedded project. It is not recognized by the pc but this may be due to the CRP2 protection that I put.
Not sure if you mean on a PC (via USB), or with the toolchain.
The latter, i.e. LPCXpresso or another dev tool, would be my approach to read out the Flash.
Perhaps you can add some instrumentation code for testing, to see where the code fails during startup.
> Otherwise the project is powered with a 3.3V flat battery.
Since CRP is usually a hallmark of a commercial project, you supposedly have the tools to simulate the problem in a lab - i.e. slowly decreasing voltage and increasing internal resistance of the supply.
I think you could speed up the supply drop by orders of magnitude (seconds/minutes instead of weeks/months), and still observe the problem.