aboutsummaryrefslogtreecommitdiffstats
path: root/src/lpc176x
Commit message (Collapse)AuthorAgeFilesLines
* Rename everything significant to Kutter except for docsTomasz Kramkowski2025-08-151-7/+7
|
* Kconfig: Add new WANT_ADC option to reduce code sizeKevin O'Connor2025-04-161-2/+2
| | | | | | | Make it possible to not compile in support for ADC on chips with small flash sizes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Add new WANT_I2C option to reduce code sizeKevin O'Connor2025-04-161-1/+1
| | | | | | | Make it possible to not compile in support for I2C on chips with small flash sizes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Add new WANT_SPI option to reduce code sizeKevin O'Connor2025-04-161-1/+1
| | | | | | | Make it possible to not compile in support for SPI on chips with small flash sizes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Add new WANT_HARD_PWM option to reduce code sizeKevin O'Connor2025-04-161-1/+1
| | | | | | | Make it possible to not compile in support for hardware pwm on chips with small flash sizes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Support step on both edges with custom minimum pulse durationKevin O'Connor2025-03-201-1/+1
| | | | | | | | | | Add support for "step on both edges" to the main stepper_event_full() code. This makes that mode of operation available even when the micro-controller is not compiled for "optimized step on both edges". It also enables the custom pulse duration support (step_pulse_ticks) when in "step on both edges" mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc_ep: Define endpoint sizes in usb_cdc_ep.hKevin O'Connor2025-02-151-0/+7
| | | | | | | | Move the definition of the usb endpoint sizes from usb_cdc.h to usb_cdc_ep.h . This allows individual boards to override the default endpoint sizes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Remove references to manufacturers in KconfigKevin O'Connor2024-10-281-1/+1
| | | | | | | | Avoid referring to particular board manufacturers in "make menuconfig". This information becomes rapidly outdated and is sometimes viewed by competing manufacturers as being unfair. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* i2c: handle errors at i2ccmdsTimofey Titovets2024-10-262-5/+10
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* armcm_link: Fix build on recent arm gcc/newlibc versionsKevin O'Connor2024-06-171-1/+1
| | | | | | | | It seems recent arm gcc versions no longer build correctly using the "--specs=nano.specs --specs=nosys.specs" linker flags. Replace those linker flags with "-nostdlib -lgcc -lc_nano". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Support selecting optional features on chips with small flash sizeKevin O'Connor2023-06-081-2/+1
| | | | | | | | | | | | | Add a new HAVE_LIMITED_CODE_SIZE symbol that enables a menu to select optional features. This symbol is enabled on chips with small build sizes. Replace the HAVE_GPIO_BITBANGING with four new symbols: WANT_GPIO_BITBANGING, WANT_DISPLAYS, WANT_SENSORS, WANT_SOFTWARE_SPI, and WANT_SOFTWARE_I2C. This allows users a little more flexibility when selecting features they need. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serial_irq: Rename SERIAL_BOOTLOADER_SIDECHANNEL to HAVE_BOOTLOADER_REQUESTKevin O'Connor2022-12-301-1/+1
| | | | | | | 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>
* armcm_link: Rename CONFIG_FLASH_START to CONFIG_FLASH_APPLICATION_ADDRESSKevin O'Connor2022-12-142-2/+2
| | | | | | Rename the build symbol name for better clarity on what it represents. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Fix lpc176x buildKevin O'Connor2022-12-142-2/+1
| | | | | | Fix build error introduced in commit 6ba2c3e1. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Use "Bootloader offset" prompt in "make menuconfig"Kevin O'Connor2022-12-141-4/+17
| | | | | | | Use the same bootloader offset terminology that is used with other chips (eg, stm32). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_reset: Introduce Kconfig FLASH_BOOT_ADDRESS valueKevin O'Connor2022-11-081-0/+4
| | | | | | | Specify the arm architecture flash bootup address for each chip type in Kconfig using a new FLASH_BOOT_ADDRESS setting. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serial_irq: Support side channel for entering bootloaderKevin O'Connor2022-09-051-0/+1
| | | | | | Add a mechanism to request the bootloader when using serial input. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move bootloader_request() from usbserial.c to main.cKevin O'Connor2022-09-053-12/+23
| | | | | | | Move bootloader_request() function so that it can be used when not using USB. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc: Rename usb_request_bootloader() to bootloader_request()Kevin O'Connor2022-07-291-1/+1
| | | | | | | Rename this board API function to a more generic name. This is in preparation for calling the function from the canbus code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Move SERIAL, USBSERIAL, and CANSERIAL definitions to src/KconfigKevin O'Connor2022-06-161-4/+0
| | | | | | There is no need to define these options in every board Kconfig file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: add support for canboot usbEric Callahan2022-06-101-0/+2
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* lpc176x: Fix serial ordering of initializationKevin O'Connor2022-03-011-1/+1
| | | | | | | The serial device needs to be enabled before setting the DLAB bit. This prevented UART3 from working. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add support for stepping on both edges of a step pulseKevin O'Connor2021-11-041-0/+1
| | | | | | | | | | Add an optimized step function for drivers that support stepping on both rising and falling edges of the step pin. Enable this optimization on 32bit ARM micro-controllers. Automatically detect this capability in the host code and enable on TMC drivers running in SPI/UART mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Fix wrong inital value at PWM setupMichael Kurz2021-08-231-8/+7
| | | | | | | | | | | This fixes a PWM going to full scale output when a initial value != 0 was given. The output was on 100% until another update occurred. This change enables the PWM counter before setting the channel values. Fixes KevinOConnor/klipper#4559 Signed-off-by: Michael Kurz <michi.kurz@gmail.com>
* lpc176x: Add support for serial on UART3 P4.29/P4.28Kevin O'Connor2021-05-253-9/+23
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move pin definitions together in serial.cKevin O'Connor2021-05-251-22/+28
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Use full peripheral clock speed; fix UART interfaceKevin O'Connor2021-05-041-1/+1
| | | | | | | | | | | Commit ae89a659 caused a regression in the lpc176x UART handling. After that commit the UART clock divisor would need to be 6.25 on lpc1768 or 7.5 on lpc1769, but the code only supports whole numbers. Set the PCLKSELx registers at startup and return to using full speed peripheral clocks. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add i2c_read functionalityMichael Kurz2021-04-251-1/+34
| | | | | | This adds the i2c_read command to the lp176x MCU. Signed-off-by: Michael Kurz <michi.kurz@gmail.com>
* lpc176x: Add hardware PWM support for LPC176xMichael Kurz2021-03-265-0/+107
| | | | | | This adds hardware PWM support for LPC176x processors. Signed-off-by: Michael Kurz <michi.kurz@gmail.com>
* lpc176x: Do not modify PCLKSELx at runtimeKevin O'Connor2021-03-251-8/+1
| | | | | | | | | The lpc176x has an errata that could cause updates to PCLKSELx to not take effect. Rework the code to use the default peripheral clock speed (25Mhz or 30Mhz) so that this register does not need to be updated at runtime. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Introduce get_pclock_frequency()Kevin O'Connor2021-03-256-12/+23
| | | | | | | Add get_pclock_frequency() - a standard way of obtaining the peripheral clock frequency. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Use "communication interface" menu option in KconfigKevin O'Connor2021-03-181-4/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Fix spi mode bitsKevin O'Connor2020-07-101-1/+1
| | | | | | | | The lpc176x hardware spi initialization code was swapping the CPOL and CPHA bits. This caused the MAX31865 and MAX31856 chips to not work correctly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Kconfig: Add a new CONFIG_HAVE_STRICT_TIMING build definitionKevin O'Connor2020-05-311-0/+1
| | | | | | | | Add a new build definition to note micro-controllers that have strict timing. The Linux mcu code does not have strict timing - all other targets currently do. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add support for additional i2c busesKevin O'Connor2020-04-213-46/+66
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Add support for ssp1 (#2393)akatik2020-01-143-22/+39
| | | Signed-off-by: Andrey Kovalev <aka@pxe.ru>
* config: Fysetc S6 generic configuration (#2220)Tobias Weiß2019-12-181-2/+2
| | | Signed-off-by: Tobias Weiß <t.weiss@bk.ru>
* lpc176x: Move chip id code from usbserial.c to new file chipid.cKevin O'Connor2019-11-263-38/+48
| | | | | | | Add a chipid.c file - this makes the code layout more similar to the other arm boards. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb_cdc: Add a usb_fill_serial() helper functionKevin O'Connor2019-11-251-23/+14
| | | | | | | Add a helper function to fill the usb serial string descriptor. Use it in the lpc176x code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Minor rework of HAVE_CHIPID kconfigKevin O'Connor2019-11-211-4/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: read chip id and use as usb serial. (#2184)Matt Baker2019-11-212-0/+50
| | | Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* flash_usb: Pass -t $CONFIG_MCU to flash_usb on all targetsKevin O'Connor2019-10-261-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_boot: Use armcm_main() instead of main() to start board codeKevin O'Connor2019-10-241-4/+5
| | | | | | | | | | The main() function has a special meaning to gcc and using it can result in different code generation. Use armcm_main() to avoid that. Also, invoke SystemInit() from the board specific armcm_main() code. This gives the board code more control over board initialization. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Use FIOPIN to set start value on gpio_out_reset()Kevin O'Connor2019-09-291-4/+1
| | | | | | | | The FIOSET and FIOCLR registers may not set an initial value if the pin is not in an output mode. So, use FIOPIN to set the initial value. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_boot: Export MCU definition from armcm_bootKevin O'Connor2019-09-182-5/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_reset: Add a new helper file defining command_reset()Kevin O'Connor2019-09-182-8/+1
| | | | | | Add a generic ARM Cortex-M implementation of the "reset" command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* armcm_link: Rename armcm_boot.lds.S to armcm_link.lds.SKevin O'Connor2019-08-221-2/+2
| | | | | | | Rename the linker script so the build does not have any conflicts with the armcm_boot.d dependency file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Update code to use armcm_boot mechanismKevin O'Connor2019-08-229-41/+37
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Move irq handler code above irq setupKevin O'Connor2019-08-223-75/+80
| | | | | | Only code movement. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lpc176x: Reset LPC_UART0->FDR when using serialKevin O'Connor2019-07-101-0/+1
| | | | | | | | | | The popular "LPC17xx-DFU-Bootloader" alters the LPC_UART0->FDR register, so be sure to reset it back to its default when using serial in Klipper. Reported by @b-vs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>