Save JPEG Image Failed before DeepSleep mode wakeup

We are using Camera.getimage(...) to save JPEG images, and everything works normally under standard conditions.
However, after the system enters deep sleep and wakes up once via GPA2, the generated JPEG files become unreadable on a PC.
Upon inspection, it appears that the JPEG header region (approximately from offset 0x20 to 0x267) contains incorrect data.
This issue persists even after a board reset or power cycle; only re-flashing the firmware can restore the image capture functionality.

Hi @Howard,

Which SDK version are you using?

Do you have a sample code for us to replicate?

Thank you.

1 Like

Dear @Kelvin_Huang,

The attached file demonstrates a simple example:
Upon power-up, the system captures a snapshot and saves it as image_firstboot.jpg, then enters deep sleep.
When Pin21 is connected to VDD33 using a Dupont wire, the system wakes up and captures another image as image.jpg.
If the reset button is pressed, the system will capture a new image again and overwrite image.jpg.

The file image_firstboot.jpg can be opened and displayed normally. However, image.jpg always has a header issue and cannot be properly displayed.

Thanks.
SDCardSaveJPEGWwithDeepSleep.7z (83.5 KB)

SDK version is 4.0.9-build20250325