I use I2S DMA way to collect data from camera.More or less a pixel randomly occured when wifi is connecting.

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

I use I2S DMA way to collect data from camera.More or less a pixel randomly occured when wifi is connecting.

Postby roctwo » Thu Mar 30, 2017 9:23 am

I use I2S DMA way to collect data from camera.
Wifi is connecting,according my investigation,when esp32 collects data from camera ,more or less a pixel occured randomly.It lead to data of the line shift.So this line will be wrong.If this issue cann't be avoided,what measures should be taken on the software?
5.jpg
5.jpg (6.33 KiB) Viewed 8891 times

ESP_Sprite
Posts: 9703
Joined: Thu Nov 26, 2015 4:08 am

Re: I use I2S DMA way to collect data from camera.More or less a pixel randomly occured when wifi is connecting.

Postby ESP_Sprite » Thu Mar 30, 2017 4:01 pm

My first thought would be: what are the impedances on your lines? WiFi drains a fair amount of power and can spread out a fair bit of EMF. If the lines to your camera are too long, not properly specced or otherwise easily influenced, you can get weirdness like this.

rsimpsonbusa
Posts: 126
Joined: Tue May 17, 2016 8:12 pm

Re: I use I2S DMA way to collect data from camera.More or less a pixel randomly occured when wifi is connecting.

Postby rsimpsonbusa » Thu Mar 30, 2017 8:16 pm

I can almost guarantee you its the DMA controller. Same problem of random bytes being changed in the SPI Driver ONLY when used with DMA controller. It reflects a lot what you describe here.

Sorry.

Somebody has to tell EspressIf of DMA problems which are really "serious" relative to our expectations.

See post on SPI Master Rx in this forum

RSN

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

Re: I use I2S DMA way to collect data from camera.More or less a pixel randomly occured when wifi is connecting.

Postby roctwo » Fri Mar 31, 2017 12:12 am

ESP_Sprite wrote:My first thought would be: what are the impedances on your lines? WiFi drains a fair amount of power and can spread out a fair bit of EMF. If the lines to your camera are too long, not properly specced or otherwise easily influenced, you can get weirdness like this.
Wiring is very short, and has very good anti-interference measures.We did our best on anti-interference.What I mostly want to know is what the software can do to solve this issue.

User avatar
ESP_krzychb
Posts: 400
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: I use I2S DMA way to collect data from camera.More or less a pixel randomly occured when wifi is connecting.

Postby ESP_krzychb » Fri Mar 31, 2017 5:56 am

I use I2S DMA way to collect data from camera.
Wifi is connecting,according my investigation,when esp32 collects data from camera ,more or less a pixel occured randomly.
I can almost guarantee you its the DMA controller. Same problem of random bytes being changed in the SPI Driver ONLY when used with DMA controller. It reflects a lot what you describe here.
Were you able to isolate DMA as the trouble maker?
I would verify if the checksum of the test pattern in ESP memory changes between subsequent retrievals.
This is assuming test pattern generated internally by camera, not a real image visible by sensor, so we have some level of confidence it does not change.

On the image we see flipped line on the test pattern retrieved over Wi-Fi but it is not clear at which stage this happened.

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

Re: I use I2S DMA way to collect data from camera.More or less a pixel randomly occured when wifi is connecting.

Postby roctwo » Sat Apr 01, 2017 12:53 am

krzychb wrote:
I use I2S DMA way to collect data from camera.
Wifi is connecting,according my investigation,when esp32 collects data from camera ,more or less a pixel occured randomly.
I can almost guarantee you its the DMA controller. Same problem of random bytes being changed in the SPI Driver ONLY when used with DMA controller. It reflects a lot what you describe here.
Were you able to isolate DMA as the trouble maker?
I would verify if the checksum of the test pattern in ESP memory changes between subsequent retrievals.
This is assuming test pattern generated internally by camera, not a real image visible by sensor, so we have some level of confidence it does not change.

On the image we see flipped line on the test pattern retrieved over Wi-Fi but it is not clear at which stage this happened.
I have tested that camera is OK.I make camere connect to altera.The issue does not happen.

Who is online

Users browsing this forum: ESP_Roland, MicroController and 71 guests