254 Commits (00cc1079af5907d896b161ee830e4ad3af2b5582)

Author SHA1 Message Date
Scott Lahteine f5eab912ed
Apply #pragma once, misc cleanup (#12322)
* Apply #pragma once in headers
* Adjust some thermistors formatting
* Misc cleanup and formatting
6 years ago
Scott Lahteine 3583e2b449
Followup to Menu Refactor (#12275) 6 years ago
Scott Lahteine 5580773191
Use FastIO, sanity-check LPC SD options, apply formatting (#12231) 6 years ago
Scott Lahteine 8d3a92fc4a Followup to millis_t patch 6 years ago
Ludy 44369d536a Use millis_t where needed (#12152) 6 years ago
Scott Lahteine c6a5c74208 Add parentheses to SD macros 6 years ago
Scott Lahteine df768e7d8f Followup to #12129 6 years ago
Chris Pepper 3c13c9e3e9 [LPC176x] Fix USEABLE_HARDWARE_PWM macro, cleanup multiple LED support (#12129) 6 years ago
Scott Lahteine cce4931342 Clean up recent contribs 6 years ago
Karl Andersson 8b5e51c9aa STM32F4xx modifications for HAL_STM32 (#12080) 6 years ago
Christopher Pepper e5b4bf22d4 Remove debug output from flash persistent store implementation 6 years ago
Christopher Pepper 254b68fe2c servo update 6 years ago
Andy Shaw 870bfd08f5 usb and sdcard sharing improvements
* Add traceback after watchdog timeout

Add the cpability to perform a traceback following a watchdog timeout.

* Enhanced hardware SPI

Allow use of either SSP0 or SSP1.
Ensure that no data is left in I/O buffers after calls to enable sharing of SSP hardware.

* Make flash emulation of eeprom the default

Make use of flash for eeprom storage the default. This means that usage of eeprom will not cause USB drive mount/unmount operations.

* Allow sharing of SD card

SD card I/O operations from the USB stack take place in idle loop, rather than at interrupt time. Allowing sharing of the SPI bus.

New configuration options to allow usage of the SD card to be specified.

* Fix problem with hardware SPI pins
6 years ago
Christopher Pepper 5ddf52d58e [HAL][LPC176x] Pull out framework into separate repository
Framework and build platform now located at https://github.com/p3p/pio-framework-arduino-lpc176x and https://github.com/p3p/pio-nxplpc-arduino-lpc176x respectively

fix mkssbase leds

move hardware serial

remove hardware/software serial

Hardware Serial extraction

HardwareSerial ISRs

fix disabled serial2 causing Serial object to link

move usb devices out to framework

separate out adc/pwm peripheral function from hal.cpp

fix includes

remove unused pwm init

move adc

HAL header update

templated filtered adc

LPC1769 platform
6 years ago
Scott Lahteine 0bd54392b7 Use uint8_t in EEPROM code 6 years ago
Scott Lahteine cb7844c8d4
Save PROGMEM on serial prefixes (#12033)
With default config and `EEPROM_SETTINGS`, saves over 200 bytes of PROGMEM.
6 years ago
Scott Lahteine ee53f7d813 Revert header reorg. 6 years ago
Scott Lahteine 0dedb3e139
Reorganize some core headers (#11983) 6 years ago
Scott Lahteine 11ac75edcb
Use PGM_P for PSTR pointers (#11977) 6 years ago
Scott Lahteine ad21a4f07b Tweaks to HAL format and order 6 years ago
Holger Müller 1a6f2b29b8 Add support for Triple-Z steppers/endstops 6 years ago
Scott Lahteine 6a3207391f Remove obsolete HAL_timer_restrain 6 years ago
Scott Lahteine a317bb4991 Remove stray tab 6 years ago
Scott Lahteine ba1919c1eb HAL tweaks to LPC1768 main 6 years ago
Scott Lahteine 0987ed2a18 Use American English 6 years ago
Chris Pepper 5573ef62c6 [2.0.x] PersistentStore update followup (#11549) 6 years ago
Scott Lahteine 834ea7fcea Remove 'const' from PersistentStore::capacity 6 years ago
Dave Johnson c64199941e Compile only selected PIO environment (#11519) 6 years ago
Andy Shaw 5be2559eda Use flash memory to emulate EEPROM (#11500)
Use a sector of the LPC flash memory to emulate EEPROM storage, removing the need to have an SD card to store system parameters.
6 years ago
Scott Lahteine 865ee5985f Followup persistent store with heading, const 6 years ago
Chris Pepper 66d2b48b59 Update PersistentStore api (#11538)
- Clean up the API to use a `static` class instance to adhere to Marlin convention
- Add `const` position data access for read/write
- Add Storage capacity to the interface
6 years ago
Scott Lahteine 15d68cb496 Pre-override of ST7920 delays before HAL.h 6 years ago
Andy Shaw 624986d423 Ensure ADC conversion is complete before reading (#11336)
The current Marlin implementation relies on a timer interrupt to start the ADC conversion and read it. However in some circumstances the interrupt can be delayed resulting in insufficient time being available for the ADC conversion. This results in a bad reading and false temperature fluctuations. These changes make sure that the conversion is complete (by checking the ADC hardware via the HAL) before reading a value.

See: https://github.com/MarlinFirmware/Marlin/issues/11323
6 years ago
teemuatlut fbcdf5eaeb Simplify stepper driver per-axis selection 6 years ago
teemuatlut f38c81cdde LPC176x: Expand HW SPI class 6 years ago
teemuatlut 3b5dec4b13 Add new LPC include folder 6 years ago
Chris Pepper 55f4744e54 [LPC176x] Endstop Interrupts Feature (#11202)
Enable the endstop interrupts feature for LPC176x boards. Although Smoothieboard chose to use non-interrupt capable pins for their endstops, and this has been copied by clones, so they can't use it.
6 years ago
Chris Pepper 5abf5bc8a7 [LPC176x] Fix Interrupt forward declarations (#11200) 6 years ago
Chris Pepper 5616581eb1 [LPC176x] Update fastio _GET_INPUT, _GET_OUTPUT macros (#11168) 6 years ago
Scott Lahteine d86f25ab63 Fix Serial ISR priority for LPC1768
Co-Authored-By: p3p <p3p@p3psoft.co.uk>
6 years ago
Scott Lahteine 99591dc20c
Filter endstops state at all times (#11066) 6 years ago
Chris Pepper 0312c42f9d [2.0.x] LPC176x Serial cleanup (#11032) 7 years ago
Chris Pepper f88adcbfd5 [2.0.x][LPC176x] Fix binary linking broken by pio update (#11026) 7 years ago
etagle a215725df6 Fix stepper pulse timing
Always honor minimum period on stepper pulse generation, and fix timing calculations

Signed-off-by: etagle <ejtagle@hotmail.com>
7 years ago
Scott Lahteine 4dbec774b5 HAL_*_TIMER_RATE => *_TIMER_RATE 7 years ago
Eduardo José Tagle d3c02410a8 [2.0.x] Small assorted collection of fixes and improvements (#10911)
* Misc fixes and improvements

- Get rid of most critical sections on the Serial port drivers for AVR and DUE. Proper usage of FIFOs should allow interrupts to stay enabled without harm to queuing and dequeuing.
  Also, with 8-bit indices (for AVR) and up to 32-bit indices (for ARM), there is no need to protect reads and writes to those indices.
- Simplify the XON/XOFF logic quite a bit. Much cleaner now (both for AVR and ARM)
- Prevent a race condition (edge case) that could happen when estimating the proper value for the stepper timer (by reading it) and writing the calculated value for the time to the next ISR by disabling interrupts in those critical and small sections of the code - The problem could lead to lost steps.
- Fix dual endstops not properly homing bug (maybe).

* Set position immediately when possible
7 years ago
Chris Pepper d87257f63c [2.0.x][LPC176x] Fix PIO build flags (#10909)
Don't build and link with different flags, the binary may not work.
7 years ago
Chris Pepper f89f7c4a82 [2.0.x][LPC176x][Build] Force single precision constants, disable freestanding (#10892) 7 years ago
Scott Lahteine 9b9b62b218 delay(SERVO_DELAY) => safe_delay(servo_delay[servo_index]) 7 years ago
Bob-the-Kuhn 1c0ad8bbae wrong type of exit method 7 years ago
Bob Kuhn 235facd545 install AVRDUDE 5.10, faster disk find for LPC1768 (#10849) 7 years ago
Bob Kuhn e2db509d58 [2.0.x] Update/Fix LPC1768 extra script upload_extra_script.py (#10843)
* Use a different method to find the volume info in Windows
7 years ago
Scott Lahteine 5f8591528e Remove #pragmas that don't help c files 7 years ago
Scott Lahteine c89649b46e Suppress U8glib build warnings 7 years ago
Bob Kuhn 6dfbb39f83 [LPC1768] Add error-handling to upload script, update autobuild.py (#10802) 7 years ago
etagle 569df3fc0c Fix interrupt-based endstop detection
- Also implemented real endstop reading on interrupt.
7 years ago
etagle 0566badcef Add memory barrier, optimal interrupt on-off
Disabling an ISR on ARM has 3 instructions of latency. A Memory barrier is REQUIRED to ensure proper and predictable disabling. Memory barriers are expensive, so avoid disabling if already disabled (See https://mcuoneclipse.com/2015/10/16/nvic-disabling-interrupts-on-arm-cortex-m-and-the-need-for-a-memory-barrier-instruction/)
7 years ago
Scott Lahteine 206014a957 Fix LPC176x timer functions
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
7 years ago
Chris Pepper 9b64fdbc3a [LPC176x] HAL: Add missing program space definition (#10776) 7 years ago
Scott Lahteine 50270b53a0 Clear up some more compile warnings 7 years ago
etagle 40d7e12827 Removing warnings from compilation 7 years ago
Scott Lahteine fb608938f8 Prevent compilation of unused u8g-oriented code 7 years ago
Scott Lahteine 37b15fe4cf Reorder HAL timer header items 7 years ago
Scott Lahteine 99ecdf59af Smarter MIN, MAX, ABS macros
Use macros that explicitly avoid double-evaluation and can be used for any datatype, replacing `min`, `max`, `abs`, `fabs`, `labs`, and `FABS`.

Co-Authored-By: ejtagle <ejtagle@hotmail.com>
7 years ago
etagle 9d98a62699 Followup to HAL optimizations and delays
- Cleanups, fixes for Due HAL code.
- TC_IER is write-only. Use TC_IMR to test ISR state.
7 years ago
Scott Lahteine a1062eec5b
Better handling of DELAY_NS and DELAY_US (#10716)
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
7 years ago
Scott Lahteine d1b619be52 Standardize some hexadecimals 7 years ago
Scott Lahteine 456cf971af HAL FastIO cleanup and fixes 7 years ago
Scott Lahteine 2578996631
[2.0.x] Emergency parser for multiple serial ports (#10524) 7 years ago
Chris Pepper 2242b98248 [LPC176x] Emergency Parser Feature (#10516) 7 years ago
Scott Lahteine a3ce8a3fcd Add sanity checks for EMERGENCY_PARSER 7 years ago
Eduardo José Tagle 0c428a66d9 Proper AVR preemptive interrupt handling (#10496)
Also simplify logic on all ARM-based interrupts. Now, it is REQUIRED to properly configure interrupt priority. USART should have highest priority, followed by Stepper, and then all others.
7 years ago
Scott Lahteine 29dda871cb Patch "upload_disk" to make python happy 7 years ago
Chris Pepper cc6d41e1d3 Use a macro for HAL header redirection (#10380) 7 years ago
Bob-the-Kuhn 85014cd132 [2.0.x] LPC1768 - automatic selection of upload disk (#10374) 7 years ago
Bob-the-Kuhn ab715c70d1 TMC SPI sanity-check and pins debugging (#10324) 7 years ago
Scott Lahteine 93305a2d5e Fix some spellings 7 years ago
Scott Lahteine 239902f861 Fix E2END and add EEPROM to Smart RAMPS
Reference #9983
7 years ago
Bob-the-Kuhn 3c58ca181c [2.0.x] Correct step pulse width on LPC1768, DUE & Teensy35_36 (#10016) 7 years ago
Scott Lahteine 98d48fc731 Followup to HAL_timer_restrain
Followup to #9985
7 years ago
Scott Lahteine ca577c1638 Fix up various spacing, comments, and typos 7 years ago
Scott Lahteine d45f19d385 Remove Unicode from var name 7 years ago
Chris Pepper a1a88ebabc HAL function to ensure min stepper interrupt interval (#9985) 7 years ago
Scott Lahteine beeed580b8
Implement digipots for MKS SBASE (#9927)
Fix #9477
7 years ago
Scott Lahteine f3dbe19669 Tweaks to HAL codestyle 7 years ago
Scott Lahteine 90fa423737
Preliminary cleanup of #include structure (#9763) 7 years ago
Scott Lahteine 799e3b2b40 LPC1768 HAL formatting/comments 7 years ago
Scott Lahteine a810e585db Drop HAL_timer_set_count 7 years ago
Scott Lahteine ca55f2927a
Pulldown pin mode support (#9701)
Implemented for LPC1768.
7 years ago
Scott Lahteine 03d790451f
[2.0.x] HAL timer set/get count => set/get compare (#9581)
To reduce confusion over the current timer count vs. the compare (aka "top") value. Caution: this re-uses the function name, changing its meaning.
7 years ago
Scott Lahteine b939a2e88c Watchdog conditional for LPC 7 years ago
Scott Lahteine 0891b58c30 #ifdef tweaks 7 years ago
Bob-the-Kuhn 3d72fe0730 snapshot 7 years ago
Scott Lahteine 33ec599ca0 Tweaky LPC1768 SPI spacing/style 7 years ago
Scott Lahteine c46de340b7 Clean up trailing whitespace 7 years ago
Thomas Moore e1fd9c08b3 [2.0.x] Add support for LPC1769 at 120 MHz (#9423) 7 years ago
Scott Lahteine b13099de3f General cleanup of HAL code 7 years ago
Scott Lahteine eb18ae9003 Define LSBFIRST / MSBFIRST for LPC 7 years ago
teemuatlut 5c69d45f5b [2.0.x] TMC2130 support for LPC platform (#9114) 7 years ago
Scott Lahteine f5cfdf6efe Use _BV32 to avoid name conflict 7 years ago