Hi Chia Ling
We are also very frustrated with the chip abnormal behavior for few months. We designed a SPI camera based on this EPM240T100C5N device for years. In recent batch, we face CPLD internal logic malfunction over time, some times it doesn't work after few seconds, some times it lasts only for 20minutes. We tried to replace all the surrounding components, it doesn't help unless change the CPLD. We also want to figure out what's the root problem comes from. The internal logic is SPI slave controller, camera controller and FIFO controller. When the CPLD goes wrong the power enable pin logic to the camera is incorrect. Once we remove the CPLD power, some times it doesn't work right after re-power up the board, and need to wait for a while then re-power the board to make the SPI working correctly. Too much details, you are also welcome if you want to discuss on the phone.