AP_Periph CAN node cannot output neopixel(ws2812) signal

I have a MatekH743 and a Matek-L431-Periph, with the following parameters set:

MatekH743:

  • CAN_D1_PROTOCOL=1
  • CAN_P1_DRIVER=1
  • NTF_LED_OVERRIDE=0
  • NTF_LED_TYPES=289

Matek-L431-Periph:

  • NTF_LED_LEN=1
  • NTF_LED_OVERRIDE=1
  • NTF_LED_TYPE=256
  • OUT5_FUNCTION=120

The H743’s firmware is ArduCopter-4.5.7 and L431’s firmware is 1.8.0.

But, the WS2812 connected to L431 is never on. I can see the node in Mission Planner’s DroneCAN panel, and the GPS connected to L431 works well.

I also stick a oscilloscope to PWM 5 pin of the L431, and can only see a straight line.

I tried to set OUT8_FUNCTION=120 on the H743, and H743’s PWM 8 can output the right signal.

Did I do anything wrong?

You can check this URL: https://firmware.ardupilot.org/AP_Periph/stable/MatekL431-Periph/features.txt, and you will see that the MatekL431-Periph does not support controlling WS2812.

Thank you. I’ve figured out that since commit e736d5ecb78bb6a5, NEOPIXEL is not supported by default. But Matek still has this feature listed on their website https://www.mateksys.com/?portfolio=can-l431#tab-id-3 .

I’ve created a PR so that this issue will be fixed. See AP_HAL_ChibiOS: fix NeoPixel support for MatekL431-Periph by villivateur · Pull Request #30469 · ArduPilot/ardupilot · GitHub