-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NXPhlite-v3 with Leitwert's serial dma #9392
Conversation
e7c6372
to
f0b2127
Compare
a459db6
to
5b0ad4e
Compare
76b3d64
to
9e4e19d
Compare
b8ed25e
to
6215117
Compare
f87e18d
to
fb89ad7
Compare
1a428f0
to
53bb82d
Compare
rebased on master |
I was a tad perplexed as to how the minimal changes done to PX4 to bring in Kinetis, could affect the V2 build spilling over by 1028 bytes. Boaty indicated it was the ROMFS. There were 3 lines added to the rcS recently but it caused a 1028 spill over. This makes sense
@dagar and I spent some time looking at memory usage. @dagar volunteered to pymavlink PR doen, that will buy us some time, but may take time to come in upstream. I can not get this branch merged until master get cleaned has some room. |
5d1c07f
to
8380c96
Compare
rebased dropping |
@@ -0,0 +1,45 @@ | |||
/**************************************************************************** | |||
* | |||
* Copyright (C) 20158 PX4 Development Team. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copyright
*/ | ||
|
||
#pragma once | ||
#if defined(UAVCAN_KINETIS_NUTTX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we set the platform define automatically from ${CONFIG_ARCH_CHIP}?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dagar I see your point and yes we could. But relative to
-DUAVCAN_${UAVCAN_PLATFORM_UPPER}_${OS_UPPER}=1
we have to consider the coupling of 2 libraries we do not have direct control over.
Uavcan use this set of defines in its drivers.
UAVCAN_KINETIS_NUTTX
UAVCAN_STM32_CHIBIOS
UAVCAN_STM32_NUTTX
UAVCAN_STM32_BAREMETAL
UAVCAN_STM32_FREERTOS
The choice was to stay consistent with uavcan. If we choose to use CONFIG_ARCH_CHIP it will break the stm32f7 usage. So defaulting it to stm32 and having the ability to override it seemed like a good choice for flexibility and decoupling.
So I would prefer to stick with it, unless you see otherwise.
One a 32.768 is added (RC16) to the board this will keep time.
On a FMU without a px4io (FMUv4, NXPhlite etc), this code should not be run.
rebased on current master and copyright dates fixed |
8380c96
to
76e2493
Compare
This ties together the Now upstreamed DMA work from @laube and @janokle of leitwert on the current PX4 nuttx
From: #8030
This is a WIP for the NXP flight V3 HW based on the K66. It builds but is incomplete as it is missing key Nuttx support in the Kinetis architecture.
The drivers/kinetis/* is just stubbed out. There is SPI, or DMA support
Missing Components
FPU support in the OS
DMA (needs to be made consistent with NuttX CS and upstreamed, should also consider streaming)
SPI - Completed
CAN
VBAT - for bootloader app communication.
Timers PIT, LPTM, and FTM, PDB - for pwm, capture, tones, and hrt.
RESET up_systemreset(void) noreturn_function;
Incomplete Drivers:
PWM supports only 1 chan per timer.
USB The K66 has 2 USB USB0 is FS (Nuttx has driver) USB1 is HS (No NuttX driver!)
UART lacking DMA kinetis_serial_dma_poll(void)
Tested with RTS/CTS HS (RTS out of CPU is per character - Consider GPIO based SW flow control ala stm32)
-[x] SBUS - tested working
TERMIOS for serial
RTC - up_rtc_getdatetime - Config issue fixed
SDHC DMA disabled will not work with it yet
OS/System dependant SW
PX4 FMUV2 Modules removed from build due to No External SPI
drivers/bma180
drivers/bmi160
NOT Portable YET
MCU version
/Firmware/src/modules/systemlib/mcu_version.c
drivers/pwm_input
drivers/test_ppm
systemcmds/hardfault_log - needs bsram
modules/uavcan
uavcan
uavcan_stm32_driver - need Kinetis CAN driver
PX4 Drivers Needing porting
drivers/kinetis/*
[ X] drv_hrt.c
drv_input_capture.c
drv_io_timer.c
drv_led_pwm.cpp
drv_pwm_servo.c
drivers/kinetis/adc
drivers/kinetis/tone_alarm
5/31 - Need to add tone control lib. - Done