Took the existing uavcan_stm32 driver and replaced all bxCAN code with
the equivalent for FDCAN following ST Reference Manual RM0433.
Note: There is still a bug somewhere in regards to FDCAN2 (probably
incorrect setup of the message RAM? Not sure.) But (FD)CAN1 is fully
functional (Classic CAN only, no CAN-FD).
Also TODO: Configure CAN filters. Right now there are no filters; all
incoming messages are accepted.
- accel & gyro FIFOs enabled
- FIFO watermark on data ready interrupt
- sensor side filtering completely disabled
- gyro now respects `IMU_GYRO_RATEMAX` (up to 2 kHz)
- saves a few % cpu (at default rate)
It cause bad transfers on a Kopis 2, though not on a bench KakuteF7 unit.
Not sure if this is a single case.
nsh> icm20689 status
INFO [SPI_I2C] Running on SPI Bus 4
INFO [icm20689] FIFO empty interval: 1000 us (1000.000 Hz)
icm20689: transfer: 46375 events, 6790549us elapsed, 146.43us avg, min 54us max 1709us 81.564us rms
icm20689: bad register: 0 events
icm20689: bad transfer: 4284 events
icm20689: FIFO empty: 0 events
icm20689: FIFO overflow: 1 events
icm20689: FIFO reset: 2 events
icm20689: DRDY interval: 375585 events, 124.93us avg, min 99us max 250us 2.322us rms
INFO [drivers_accelerometer] /dev/accel device instance: 0
INFO [drivers_accelerometer] calibration scale: 1.02174 0.99918 0.98338
INFO [drivers_accelerometer] calibration offset: 0.76124 -0.00725 -0.16437
INFO [drivers_gyroscope] /dev/gyro device instance: 0
INFO [drivers_gyroscope] calibration offset: -0.08153 0.02432 0.00050
The defualt in NuttX is OSPEED of 50Mhz. This is realy a slew
rate control. At the default high slew rate the overshoot was
.7 Volts. On a ICM20649 this was causing the device to output
garbage. All 0s
N.B. A passive scope or Logic analyser's probes load will mask
the failure. Useed a FET probe to verify the issue.
* Add basic GPIO test app for R/W on pins from nuttx shell
* Add gpio command to fmu-v3 and fmu-v4
* Sanitize gpio commands by pin configs, --force to override