Pinchange interrupt during eeprom write -> crash.

VladTheImpaler
Posts: 16
Joined: Fri Jul 05, 2019 4:35 am

Pinchange interrupt during eeprom write -> crash.

Postby VladTheImpaler » Sat Jul 13, 2019 3:07 pm

Pinchange interrupt during eeprom write -> crash.

ISR is IRAM_ATTR.

Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed)
Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40149a4c: bad00bad bad00bad bad00bad

Detaching IR, writing eeprom and reenabling IR does work.

So finally i am able to change my esp32quadcopter PID's in-flight with my phone. I have o use an extarnal RC radio, a flysky $50 radio wih micro receiver, ppmsum outpu fed to the esp32. Yep, i have a flyable webserver.
https://youtu.be/sBia8O8xZoU

Image
Attachments
DSC02373.jpg
DSC02373.jpg (1.61 MiB) Viewed 8121 times

User avatar
HermannSW
Posts: 97
Joined: Fri Oct 27, 2017 6:58 am
Location: Eberbach, Germany
Contact:

Re: Pinchange interrupt during eeprom write -> crash.

Postby HermannSW » Sun Jul 14, 2019 6:54 am

👍

You reference a previous non-external RC video in your github page as well. I added github repo link to the new youtube video as comment:
https://github.com/PepeTheFroggie/EspCopter32

Nice diagram.
Do you plan to replace the ESP32 used with ESP32-CAM that you used in your "ESP32 CAM for FPV and RC" thread for FPV drone?
https://www.esp32.com/viewtopic.php?f=19&t=11337

In https://github.com/PepeTheFroggie/EspCo ... ter/rc.ino you state "// because edge triggering on esp32 doesent work yet"; did you raise a github issue against ESP32 somewhere?

Image

VladTheImpaler
Posts: 16
Joined: Fri Jul 05, 2019 4:35 am

Re: Pinchange interrupt during eeprom write -> crash.

Postby VladTheImpaler » Sun Jul 14, 2019 12:14 pm

>Do you plan to replace the ESP32 used with ESP32-CAM

Yes, but there are muliple problems.

I need to use wire-2 hardware for the gyro on esp32cam because wire-1 is used for camera. Untested yet.
I need a really good RC link. External RC or Espnow-rc. Webpage RC wont do for a drone.
I need a sub-500g drone because of local regulations. My old F330 frame is 700g.

Pins on esp32cam will be a problem. Need 4 for esc, 1 for ext-rc, 2 for 6050 / 9250 i2c, 1 (serial rx) for gps and 1 adc for "battery low".

> edge triggering on esp32 doesent work yet"; did you raise a github issue

No i did not. Edge trigger works, just "rising" or "falling" doesent work. Can work-around easily.

Sub 500g 250 size esp32-cam copter in the build:
Attachments
DSC02375.jpg
DSC02375.jpg (1015.66 KiB) Viewed 8072 times

User avatar
HermannSW
Posts: 97
Joined: Fri Oct 27, 2017 6:58 am
Location: Eberbach, Germany
Contact:

Re: Pinchange interrupt during eeprom write -> crash.

Postby HermannSW » Sun Jul 14, 2019 5:11 pm

VladTheImpaler wrote:
Sun Jul 14, 2019 12:14 pm
I need a sub-500g drone because of local regulations. My old F330 frame is 700g.
Local regulations exist in Germany too; I had four Eachine E52 drones, lost one in a high tree.
Those drones wheigh less than 100g, and in Germany drones <250g don't even need a fireproof ID label.
Since the E52 does have camera, I am not allowed to fly them over residential estate without allowance.
But I have lots of hayfields just outside of Eberbach hostpital 1.5km radius no-flight zone!
https://twitter.com/HermannSW/status/99 ... 09/photo/1

I managed to reverse engineer v1 version of Wifi protocol between Android app and E52 camera:
https://github.com/Hermann-SW/wireless- ... -E52-drone

Eachine E52 drone had no problems to take 14g of additional weight and fly with Raspberry Pi ZeroW on top:
Image

I did reverse engineer v1 version of protocol during 3 week vacation in Denmark last year, will take a v2 protocol drone with me this year and see whether Pi ZeroW can control that done camera (and drone) as well. Idea is to have Pi ZeroW ride the drone and fly it autonomously (get camera video and send commands over Wifi).

If that does not work, I will start easier with my caterpillar robots, plan is to add FPV and RC control to one of the five starting with your github project:
https://github.com/PepeTheFroggie/ESP32CAM_RCTANK

Later that robot should follow lines autonomously, but fast (I have 2.5m/s and 5m/s caterpillar robots). Getting that working autonomously seems to be easier than make Pi ZeroW ride a drone autonomously (based on analyzing camera video, but not much when flying with drone's "altitude hold mode" it should be more or less similar to drive a caterpillar robot):
Image


P.S:
I did add a Pi Zero to top of small RC airplane, and Raspberry camera to its bottom:
https://www.raspberrypi.org/forums/view ... 7#p1196292
Image

Just questioning on whether it has to be a Pi to ride and control the E52 drone.
Placing an ESP32-CAM module below the drone would allow to make use of the drone camera in flight direction via Wifi, and ESP32-CAM ov2640 direction earth ...

VladTheImpaler
Posts: 16
Joined: Fri Jul 05, 2019 4:35 am

Re: Pinchange interrupt during eeprom write -> crash.

Postby VladTheImpaler » Sun Jul 14, 2019 6:44 pm

I see i see. You are raspberry - cam expert. I have some serious questions. My raspberry knowledge is = 0.

Sending broadcast video frames from esp32cam to raspberry? How-to?
Which aliexpress raspberry as video RX to buy?
Which mini raspberry with cam as video TX to buy?

This stuff any good?
https://www.aliexpress.com/item/32895891785.html
https://www.aliexpress.com/item/32793193637.html
https://www.aliexpress.com/item/33014675077.html
I need a potent TX ... got a HB9 HAM licence btw.

Planes:
My skywalker mini (80 cm wingspan) did 1.5km analog FPV (200mw tx) and 45min flight time with two 18650 cells. 60 min flighttime without fpv. Arduino 32u4 - mpu6050 flight controller, cheapo gps, waypoints and RTH. Nothing an esp32cam couldnt do.
gps.jpg
gps.jpg (228.44 KiB) Viewed 8017 times
cammount.jpg
cammount.jpg (370.59 KiB) Viewed 8017 times

User avatar
HermannSW
Posts: 97
Joined: Fri Oct 27, 2017 6:58 am
Location: Eberbach, Germany
Contact:

Re: Pinchange interrupt during eeprom write -> crash.

Postby HermannSW » Sun Jul 14, 2019 8:12 pm

VladTheImpaler wrote:
Sun Jul 14, 2019 6:44 pm
Sending broadcast video frames from esp32cam to raspberry? How-to?
Take Pi ZeroW or any other Pi with Wireless and transfer via Wifi.
Raspberry PIs run Raspbian, a Linux variant derived from Debian.
Only the Zero[W] is (1GHz) single core, all other PIs are quad core (1.2GHz or 1.4GHz).
Which aliexpress raspberry as video RX to buy?
You buy Raspberries at offical resellers, not aliexpress.
Select model, country, and then you will get list of resellers:
https://www.raspberrypi.org/products/
Which mini raspberry with cam as video TX to buy?
Mini Raspberry == Raspberry Pi Zero or Pi ZeroW (Wireless).
That is a 13.91$ normal Pi Zero, you can buy for 5$ at official resellers:
https://www.raspberrypi.org/products/raspberry-pi-zero/
That is a 9$ mini camera version of Raspberry v1 camera.
You get (bigger board, as shown in my last posting airplane photo) Raspberry v1 (clone) module for <4$ these days:
https://www.aliexpress.com/wholesale?Se ... FreeShip=y
That 5MP camera can do 1920x1080@30fps, 1296x730@49fps and 640x480@90fps.
https://www.aliexpress.com/item/33014675077.html
I need a potent TX ... got a HB9 HAM licence btw.
I have 0 knowledge on powerful transmitters.
The Pi Zero I attached to RC airplane had no Wifi and stored videos on SD card.
You can easily transmit Raspberry camera video via Wifi (what bandwidth permits), cheapest+smallest is 10$ Raspberry Pi ZeroW (if you are in the US and near a Micro Center location, you can get one for 5$):
https://www.raspberrypi.org/products/ra ... pi-zero-w/


You can find (nearly) all I know about and did with Raspberry cameras here:
https://stamm-wilbrandt.de/en/Raspberry_camera.html

Beginning of last year maximal framerates for Raspberry v1/v2 camera was 90fps/120fps.
I did move the limits to 750fps/1007fps for 640xH modes with reduced vertical resolution.
This is a v1 camera 640x128@350fps video of classical mouse trap chain reaction, played 14 times slowed down [15MB]:
Image


Mouse trap closes in 1/100th second.
This is 640x75@1007fps v2 camera mouse trap video, played at 1fps.
It even captured the spark in front, generated by mouse trap bar hitting black piezo igniter:
Image

Who is online

Users browsing this forum: Corand and 37 guests