AP_Periph 1.0.0 stable released

Good day Phil, thank you for the info you gave me…, i will follow your instructions.
I will check first if the pinout for the node I’ve done is correct.

Take a look at AN2606 page 94, referring for to table 2 for different ways to flash it if you haven’t broken out the SWD pins.

Good day Phil, i’ve try follow your instructions… but after ive give the command for build ./Tools/scripts/build_bootloaders.py f303-10057, nothing happen

Please send the output of this command: ls ./libraries/AP_HAL_ChibiOS/hwdef/f303*

Or you can look me up on Discord.

ok thank you… i will try your command.
Just in case i will contact you on Discord

I’ve just released AP_Periph 1.2.0beta1. I expect to release 1.2.0 final in a few days.
Key changes are:

  • support for battery monitor nodes
  • support for testing in SITL
  • improvements in error reporting to the flight controller
  • fixes to stack sizes
  • MSP output support
  • support for BGR NCP5623 LEDs
  • switched to common CAN stack with main ArduPilot vehicle code
  • added several new board types

also, for rapid discussion of AP_Periph development I recommend the ap_periph channel on discord https://ardupilot.org/discord

Does anyone have the SDP33 airspeed sensor running on the Matek M8Q-CAN board ? I can’t get the SDP33 sensor to work on the M8Q-CAN.

The built-in GPS, barometer and the compass work fine, only the SDP33 is not recognized. To exclude a defective SDP33, I had it running on the I2C input of the Pixhawk without problems. I had also changed the connection cables to be on the safe side.

Neither the installation of AP_Periph V1.2beta2 nor a daily-build from 2020-12-19-15:12 changed anything.

Here are the settings:
FC Pixhawk 1 (2MB) Arduplane V4.0.7.
a
b


d

Now I’m not sure if it’s because of the firmware on this board
http://www.mateksys.com/?portfolio=m8q-can#tab-id-8
or if the board is simply broken e.g. at the I2C connector.

EDIT: Same problem with m9n-CAN
http://www.mateksys.com/?portfolio=m9n-can

Hi everyone,

I had a few questions about AP_Periph’s functionality:

  • Can a single instance of AP_Periph handle multiple sensor inputs and output data from multiple sensors to the CAN bus?
  • Can AP_Periph be run on a Pixhawk to output the onboard sensor data to CAN bus via UAVCAN?
  • Would it be possible to run the base Ardu* code along with AP_Periph on a Pixhawk (at the same time)?

Thanks!

yes, a lot of the AP_Periph builds do that, for example GPS, baro, mag

yes, we already have build targets for quite a few boards that normally run a full flight stack (eg. CubeBlack, Pixracer, CubeOrange). Adding more is easy

no, not possible at this time

1 Like

image
I’ve just released AP_Periph 1.2.0 stable firmware. This is a major release with the following key features:

  • support for battery monitor nodes
  • support for testing in SITL
  • improvements in error reporting to the flight controller
  • fixes to stack sizes
  • MSP output support
  • support for BGR NCP5623 LEDs
  • switched to common CAN stack with main ArduPilot vehicle code
  • added several new board types

Many thanks to everyone who contributed to this release! Special thanks to @bugobliterator and @MagicRuB for their extensive work on AP_Periph over the last few months.

As usual firmware releases are on https://firmware.ardupilot.org/AP_Periph/

7 Likes

Hey everyone,

I’ve been looking through the UAVCAN specification (https://uavcan.org/specification/UAVCAN_Specification_v1.0-beta.pdf) and DS-015 drone standard specification (https://github.com/Dronecode/SIG-UAVCAN-Drone/blob/main/DS-015%20UAVCAN%20Drone%20Standard%20v1.0.pdf), and noticed it doesn’t have latitude and longitude for GPS as a Public Regulated Datatype. I was wondering if you guys knew how AP_Periph supports GPS messages through UAVCAN? Is it through a Non-regulated datatype in UAVCAN just used by ardupilot? Also, does AP_Periph support UAVCAN v0 or v1 currently?

Thanks!

1 Like

we support that the UAVCAN project now calls V0. It used to be called V0.9. The V1 version isn’t complete yet. We will likely add support for V1 in the future, but for now V0.9 is the version used by all existing peripherals.

we use these msgs:

1 Like

Hello!

I have a Matek M9N CAN GPS, which I tried to update via Mission Planner.

Mission Planner doesn’t find the new version over the internet.
So I downloaded “AP_Periph.bin” manually from here https://firmware.ardupilot.org/AP_Periph/stable/f303-MatekGPS/ and tried to upload this file.
But the “Progress” window stays like this forever …


Should the update work with Mission Planner?
Or do I have to update via serial port?

Use UAVCAN GUI.
Or Try updating MP to latest beta.

Update worked with UAVCAN GUI :slight_smile:
Thank you!
It was already the latest MP Beta “1.3.74.1 build 1.3.7681.3767”

It took me a while to find this button:
grafik
Otherwise UAVCAN GUI showed the node names with “?” and always said: " Discovery not possible - local node is configured in anonymous mode"

Hi Tridge,

First of all thank you very much for adding support for battery monitoring!

I tried to adjust the hwdef.dat file such that i can compile for a battery monitor based on a STM32F103.
It is working so far that I receive battery monitor messages via the uavcan gui, but it seems that the ADC is not working.
I found out that Chibios has not really support for the ADC of the STM32F103. Is there a way to get the ADC functional within this application?

If not, does the battery monitor support analog mode for the STM32F303?
I assume that I have to make the following settings in the hwdef file:
define HAL_USE_ADC TRUE
define STM32_ADC_USE_ADC1 TRUE
and remove the line: define HAL_DISABLE_ADC_DRIVER TRUE
Is this correct? and did I forget something yet?

Thank you very much in advance!
Kind Regards,

Roel ten Have

I am toying around with a F303 CAN Node a little bit and stumbled into an issue which I couldn’t resolve so far.

My current test setup consists of several GNSS modules (Holybro F9P, Holybro M8N, Here 2 in I2C mode) and a Cube Orange.

As Firmware I have used F303-GPS as well as F303-Universal

GPS and Compass are detected perfectly fine, the only issue is the integrated LED. I can’t get it to work on any module.

If I connect the GNSS modules directly via Serial /I2C to the Cube all LEDS are working, so I can confirm that the hardware is fine.

NTF led is set to 231 and a Here 3 directly on CAN1 has also working LEDs.

Is the LED through CAN in general not supported or am I missing something and there is an additional configuration necessary?

Thanks a lot for your help.

right, we haven’t added that support yet
I don’t plan on adding this anytime soon, but maybe someone else can do it for you

no, we only support it on F4, F7 and H7 so far

Thank you for your reply!
My coding C++ skills are very limited, but maybe I will give it a try.
What is the most logical way to add support for the ADC for STM32F1xx series?
Should it be added in: “AP_Periph_1_2_0/libraries/AP_HAL_ChibiOS/AnalogIn.cpp”?
Or do we need to add a driver in the “AP_Periph_1_2_0/modules/ChibiOS/os/hal/ports/STM32/LLD/ADCvX” folder?
It looks like that the ADC driver of Chibios is not used, but is this true?

Thank you in advance.
Kind regards,
Roel