w2016561536 commented on issue #17809:
URL: https://github.com/apache/nuttx/issues/17809#issuecomment-3831118819
Hello henrykotze!
I have tried to running px4 on nuttx 12.10.0, with mpu6500 imu sensor
mounting on spi 2.
However esp32 seems too slow to run ekf2. Even turn off the wifi interface
and all mavlink instance, make flash running at 80MHZ and QIO Mode ,cpu running
on nearly 100%. Here is the terminal report:
```
nsh> top
PID COMMAND CPU(ms) CPU(%) USED/STACK PRIO(BASE)
TSLICE FD
0 Idle_Task 16083 1.010 3744/ 4096 0 ( 0)
0 3
1 lpwork 0 0.000 3320/ 4032 100 ( 0)
199 3
2 nsh_main 0 0.000 4712/ 8144 100 ( 0)
59 3
3 rt_timer 0 0.000 1312/ 1992 223 ( 0)
104 3
5 wq:manager 0 0.000 656/ 1224 255 ( 0)
197 3
6 wq:lp_default 14 1.039 2296/ 4080 205 ( 0)
200 3
728 top 8 0.761 1288/ 4064 237 ( 0)
190 3
207 wq:SPI2 123 9.077 2256/ 4080 252 ( 0)
200 3
311 wq:hp_default 7 0.573 2824/ 4080 237 ( 0)
200 3
313 wq:nav_and_controllers 236 17.403 2144/ 4072 242 ( 0)
200 3
314 wq:rate_ctrl 126 9.315 1432/ 4080 255 ( 0)
200 3
315 wq:INS0 759 55.847 1872/ 5976 241 ( 0)
200 3
365 commander 43 3.098 1072/ 3192 140 ( 0)
145 4
446 navigator 13 0.995 1584/ 4040 105 ( 0)
147 11
Processes: 14 total, 6 running, 8 sleeping
CPU usage: 98.11% tasks, 0.88% sched, 1.01% idle
Uptime: 536.245s total, 16.083s idle
nsh> ifconfig
wlan0 Link encap:Ethernet HWaddr 08:a6:f7:97:d0:14 at DOWN mtu 1500
inet addr:0.0.0.0 DRaddr:0.0.0.0 Mask:0.0.0.0
wlan1 Link encap:Ethernet HWaddr 08:a6:f7:97:d0:15 at DOWN mtu 1500
inet addr:0.0.0.0 DRaddr:0.0.0.0 Mask:0.0.0.0
nsh> work_queue status
Work Queue: 6 threads RATE INTERVAL
|__ 1) wq:rate_ctrl
| |__ 1) control_allocator 250.0 Hz 4001 us
| \__ 2) vehicle_angular_velocity 250.0 Hz 4001 us
|__ 2) wq:SPI2
| \__ 1) mpu6500 249.5 Hz 4007 us (4000
us)
|__ 3) wq:nav_and_controllers
| |__ 1) airspeed_selector 10.0 Hz 100070 us (100000
us)
| |__ 2) fw_att_control 125.0 Hz 8001 us
| |__ 3) fw_pos_control 50.0 Hz 19999 us
| |__ 4) fw_rate_control 250.0 Hz 4001 us
| |__ 5) land_detector 125.0 Hz 8001 us
| |__ 6) sensors 125.0 Hz 7999 us
ERROR [sensors] Gyro #0 fail: STALE!
| |__ 7) vehicle_acceleration 125.0 Hz 8000 us
| |__ 8) vehicle_air_data 19.9 Hz 50194 us
| \__ 9) vehicle_gps_position 3.3 Hz 299952 us
|__ 4) wq:INS0
| |__ 1) ekf2 125.0 Hz 8001 us
| \__ 2) vehicle_imu 125.0 Hz 8001 us
|__ 5) wq:hp_default
| |__ 1) battery_status 0.0 Hz 0 us
| |__ 2) fw_autotune_attitude_control 121.4 Hz 8238 us
| |__ 3) manual_control 4.9 Hz 203114 us
| |__ 4) pwm_out 3.3 Hz 299923 us (300000
us)
| \__ 5) rc_update 0.0 Hz 0 us
\__ 6) wq:lp_default
|__ 1) gyro_calibration 49.5 Hz 20192 us (20000
us)
|__ 2) mag_bias_estimator 49.5 Hz 20213 us (20000
us)
|__ 3) parameters 0.0 Hz 0 us
\__ 4) send_event 29.8 Hz 33602 us (33333
us)
```
Here is my repo:
https://github.com/w2016561536/PX4-Autopilot/tree/px4_esp32_1.16
I do not know whether my porting is right. If you want to compile it. You
need to compile config ``` esp32-devkitc:sta_softap ``` in nuttx submodule for
downloading espressif hal libs and add
```
CFLAGS += -D__NuttX__
CHIP_SERIES=esp32
```
in the beginning of file `
platforms/nuttx/NuttX/nuttx/arch/xtensa/src/esp32/hal.mk `, then · make
espressif_esp32 ·
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]