AP_Periph and DroneCAN tx_overflow

Hello,
while compiling a basic AP_Periph for a STM32F407 board, we find that there is a consistent tx_overflow happening on the node.
Looking at the code, sems like mailboxes aren’t sent out fast enough and given there are only 3 of them, they will refuse any new chunck of DroneCAN message.
Node in question is 33, bus 0 (bus 1 is not connected).
Node 40 is a Here4 and there are no issue there.


What can be causing this? We tried removing USB stack, CAN2, anything but bare functions, and the problem is still present.

Here’s the hwdef.dat contents:

# HW defines for devboard
# with STM32F407VET6, 12MHz crystal and dual CAN

# MCU class and specific type
MCU STM32F4xx STM32F407xx

# crystal frequency
OSCILLATOR_HZ 12000000
#STM32_ST_USE_TIMER 5

# board ID for firmware load
APJ_BOARD_ID 9999

# setup build for a peripheral firmware
env AP_PERIPH 1

FLASH_RESERVE_START_KB 64
FLASH_SIZE_KB 512

# store parameters in pages 2 and 3
STORAGE_FLASH_PAGE 2
define HAL_STORAGE_SIZE 15360

# ---------------------------------------------
define HAL_LED_ON 0             # sink
PE13 LED_BOOTLOADER OUTPUT LOW  # LED 1
PE14 LED_ACTIVITY   OUTPUT LOW  # LED 2
PE15 LED            OUTPUT HIGH # LED 3

# enable CAN support
PD0 CAN1_RX CAN1
PD1 CAN1_TX CAN1

define HAL_CAN_DEFAULT_NODE_ID 33
define CAN_APP_NODE_NAME "board.name"

#USB_STRING_MANUFACTURER "Custom"
#USB_STRING_PRODUCT "board_name"

# CAN 2
PB5 CAN2_RX CAN2
PB6 CAN2_TX CAN2

#CAN_ORDER 1

define HAL_DISABLE_LOOP_DELAY

define HAL_NO_MONITOR_THREAD

# debugger support
PA13 JTMS-SWDIO SWD
PA14 JTCK-SWCLK SWD

SERIAL_ORDER USART1 USART6

# USART1 for debug
PA9  USART1_TX USART1 SPEED_HIGH
PA10 USART1_RX USART1 SPEED_HIGH

#PA11 OTG_FS_DM OTG1
#PA12 OTG_FS_DP OTG1

# ADC inputs, scale 10 is used so voltages
# stay in 3.3v max range with 6S
PC0 CELL1 ADC1 SCALE(10) ANALOG(1)

define HAL_PERIPH_ENABLE_RCIN 1
define AP_PERIPH_RC1_PORT_DEFAULT 5

# USART6 (RX/SBUS)
undef PC6
undef PC7
PC6 USART6_TX USART6 SPEED_HIGH
PC7 USART6_RX USART6 SPEED_HIGH

Cheers!