| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Realtime programming best practice is to lock realtime code
memory to prevent paging which will lead to unbounded latencies. The
Linux MCU process has well bounded memory and small RAM footprint
so locking the entire process' RAM has no downsides and will improve
behavior when the system comes under memory pressure.
(See bootlin training and Linux Foundation documentation linked below.)
RT process priority ranges from 0-99 (although POSIX only requires 32),
boost MCU process priority to half the max/2 to improve robustness when
the system comes under pressure from other RT Kernel or user processes.
Reference links:
bootlin: https://bootlin.com/doc/training/preempt-rt/preempt-rt-slides.pdf
Linux Foundation: https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/application_base#howto_build_a_simple_rt_application
Signed-off-by: Matthew Swabey <matthew@swabey.org>
|
|
|
| |
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
|
|
|
|
|
| |
Allow I2C bus speed to be set by appropriate Klipper commands.
Signed-off-by: Matthew Swabey <matthew@swabey.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reading an I2C device from the Linux MCU used a separate write(2)
to select the target register & read(2) to get the value(s). This
implementation uses ioctl(file, I2C_RDWR, ...) to skip a large bus idle
period and extra process sleep by combining them like the stm32.
I2C_RDRW requires I2C_FUNC_I2C flag in the I2C driver. I2C_FUNC_I2C
is defined in:
BCM2835: Pi 1 Models A, A+, B, B+, the Raspberry Pi Zero, the
Raspberry Pi Zero W, and the Raspberry Pi Compute Module 1
BCM2836: Pi 2 Model B
Identical to BCM2835 except Cortex
BCM2837: Pi 3 Model B, later models of the Raspberry Pi 2 Model B,
and the Raspberry Pi Compute Module 3
BCM2837B0: Pi 3 Models A+, B+, and the Raspberry Pi Compute Module 3+
BCM2711: Pi 4 Model B, the Raspberry Pi 400, and the Raspberry Pi
Compute Module 4
RK3xxx: Rockchips SoCs NanoPi, RockPi, Tinker, etc.
SUNXI: H2, H3, etc. Orange Pi
AMLOGIC: S905x, Banana Pi, Odroid, etc.
TEGRA: NVidia Jetson etc.
MediaTek: Several SBCs in other ranges
Signed-off-by: Matthew Swabey <matthew@swabey.org>
|
|
|
| |
Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
|
|
|
|
|
| |
Add files to support AR100
Signed-off-by: Elias Bakken <elias@iagent.no>
|
|
|
|
|
|
|
|
| |
Adds sdio support for the stm32f4 to allow for SD card flash updates
without power cycling some boards, e.g. BTT Octopus Pro.
Signed-off-by: H. Gregor Molter <gregor.molter@secretlab.de>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Steven Gotthardt <gotthardt@gmail.com>
|
|
|
|
|
| |
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Using the CAN2 interface still requires that CAN1 be enabled, and the
filtering hardware is always on the CAN1 hardware block.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
The existing sample times are not long enough to reliably sample the
internal temperature sensor. Longer sample times should also improve
results with temperature sensors that have a higher inductance.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Only adc1 and adc2 have these CR register bits on stm32h723.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
Prefer explicitly setting the CR hardware register to defined values
during initialization.
Also, prefer "#if CONFIG_MACH_STM32H7" over bit definitions to make it
clear that the code applies only on stm32h7.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Bits are cleared in the ISR register by writing 1, not by masking.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The stm32l412 doesn't have a PLLSAI1 clock and therefore the CKMODE
should not be set to zero.
The stm32h7 chips run the adc at 25mhz, so BOOST should be set to
0b10.
Improve timing comments.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Use the common lookup_clock_line() code to lookup the adc clock lines.
This also enables resets on the adc1/adc2 hardware block.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Add a pad entry to adc_pins[] on stm32l4 so that it matches the other
chips.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Not all chips implement hardware oversampling. The software already
implements oversampling, and additional hardware oversampling is
unlikely to improve results. Remove the hardware oversampling to
simplify the code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
On all chips, the JQDIS bit is set and the CONT, RES, ALIGN bits are
clear after a reset. There is no need to program the OVRMOD bit. Use
the same logic across chips to help unify the adc implementation.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Not all chips have the LDORDY flag, while all chips will stabilize in
10us. There is no need for two different implementations as it is
safe to wait 20us on all chips.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Stefan Dej <meteyou@gmail.com>
|
|
|
|
|
|
| |
A whitespace and comment change only - no functional changes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
| |
Add stm32g07x family support.
Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
|
|
|
|
|
|
|
| |
Support disabling dfu_reboot if HAVE_BOOTLOADER_REQUEST is disabled in
the Kconfig rules.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Since avr does not define HAVE_BOOTLOADER_REQUEST it is not necessary
to define the function.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
Check for the build symbol prior to calling bootloader_request().
Enable the build symbol on rp2040, atsam, and atsamd chips.
This also enables serial bootloader requsts on rp2040, atsam, and
atsamd.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Include for bootloader_request() definition.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Rename the build symbol. This is in preparation for enabling
HAVE_BOOTLOADER_REQUEST on usb and canbus.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
A "bool" option already defaults to "n" so no need to state that
explicitly.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Chris Lee <clee@mg8.org>
|
|
|
|
|
|
|
| |
Move the stm32 DFU reboot logic to a new dfu_reboot.c file. This
simplifies the per-chip code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Add a check to the start of initial_pins_setup() to make it easier for
gcc to optimize the code if it is not in use.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
A typo in commit e33b41ab broke USB selection on stm32g0b1.
Reported by @Pmant.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Commit c5d56f44 neglected to define ADCIN_BANK_SIZE in stm32h7_adc.c
on stm32l4.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
| |
Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Move the watchdog code to its own file so that it is easier to disable
it for development builds.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Rename the build symbol name for better clarity on what it represents.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Fix build error introduced in commit 6ba2c3e1.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Rename canserial_send() to canbus_send() and canserial_set_filter() to
canbus_set_filter(). This makes it more clear where the code should
reside.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Rename canbus_send() to canhw_send() and rename canbus_set_filter() to
canhw_set_filter(). This makes it more clear where the code should
reside.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|