Modem sleep mode causes data from camera abnormal?

roctwo
Posts: 95
Joined: Mon Nov 28, 2016 3:12 am

Modem sleep mode causes data from camera abnormal?

Postby roctwo » Thu May 25, 2017 6:44 am

The IDF version I use is the rc2.0 version. Network environment is WiFi lan.The communication protocol between camera and esp32 is i2s.
I use esp32+camera to do network real-time video transmission. When esp32 grab a frame of data from camera, it sends out a frame of data through the wifi. When the esp32's WiFi finished transimission of one frame , it goes into modem sleep. If I set modem sleep mode, the image becomes abnormal after the system has been running for some time. But if I don't set modem sleep mode, the system will work normal all the time.
According to our debugging,It is confirmed that image becomes abnormal is not because of WiFi communication problem. It is caused by esp32's collecting data from camera . That is, the modem sleep mode causes the esp32's collecting data from the camera failed. I would appreciate it if you could give me some advice.
normal image:
QQ图片20170525085518.png
QQ图片20170525085518.png (19.29 KiB) Viewed 3824 times
abnormal image:
Attachments
QQ图片20170525085552.png
QQ图片20170525085552.png (28.9 KiB) Viewed 3824 times

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: Modem sleep mode causes data from camera abnormal?

Postby ESP_igrr » Thu May 25, 2017 2:06 pm

Don't have a clue why modem sleep affects I2S transfer, but here's what helped me troubleshoot the camera driver in the past. Instead of using a real camera as a data source, use signal generator which will produce known pixel data, every time. Then it is much easier to spot what exactly is wrong with input data (such as, missing bytes, extra bytes, incorrect bytes).

What kind of signal generator you would use mostly depends on the equipment you have available. For example, I had a lattice icestick lying around, so I made a signal generator out of it (https://gist.github.com/igrr/593e95297c ... c539ce8d6a). Other FPGAs or bench signal generators would also do the trick.
Hope this helps.

Who is online

Users browsing this forum: grantb and 51 guests