Commit Graph

82 Commits

Author SHA1 Message Date
c6dbe6e9d6 Fix Teensy 3.5/3.6 __get_primask (#13514) 2019-03-29 12:23:09 -05:00
e40636a7c1 Replace digitalPinHasPWM with HAS_TIMER (#13520) 2019-03-29 12:21:14 -05:00
ffc2c2d7c5 Move FAST_PWM_FAN code to HALs (#13491) 2019-03-26 01:03:23 -05:00
32332bcd03 Proceed with Teensy 3.5/3.6 HAL (#13450) 2019-03-24 00:08:32 -05:00
67bee06e43 No patch needed for non-libmaple analogWrite
See https://github.com/pinchies/Marlin/pull/1#issuecomment-471388743
2019-03-13 07:21:10 -05:00
f89b375fb9 Fixes and improvements for PWM pins (#13383) 2019-03-13 06:51:15 -05:00
1f7e220387 Make HAL ISR macros function-like 2019-03-10 20:44:27 -05:00
2212da453a Distinguish between analog/digital auto fans (#13298) 2019-03-05 00:41:31 -06:00
3a1b6fe8c1 Coding standards 2019-02-19 14:58:39 -06:00
0feeef2604 Update copyright in headers 2019-02-12 15:30:11 -06:00
ce563d7c2e Various general cleanups
Mostly from the L6470-oriented PR
2019-01-19 16:56:12 -06:00
c986239837 A single SERIAL_ECHO macro type (#12557) 2018-11-29 16:58:58 -06:00
4e0c935959 Update HAL and libs formatting 2018-11-10 19:43:23 -06:00
f5eab912ed Apply #pragma once, misc cleanup (#12322)
* Apply #pragma once in headers
* Adjust some thermistors formatting
* Misc cleanup and formatting
2018-11-04 02:25:55 -06:00
63ce8baa55 Fix Teensy 3.5/3.6 ADC access for ADC1 (#12258) 2018-10-28 15:51:49 -05:00
0bd54392b7 Use uint8_t in EEPROM code 2018-10-09 19:00:01 -05:00
1a6f2b29b8 Add support for Triple-Z steppers/endstops 2018-09-16 00:35:58 -05:00
6a3207391f Remove obsolete HAL_timer_restrain 2018-08-31 16:17:22 -05:00
0987ed2a18 Use American English 2018-08-22 17:16:18 -05:00
834ea7fcea Remove 'const' from PersistentStore::capacity 2018-08-14 04:46:10 -05:00
c64199941e Compile only selected PIO environment (#11519) 2018-08-14 03:28:52 -05:00
865ee5985f Followup persistent store with heading, const 2018-08-13 23:55:33 -05:00
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
2018-08-13 17:30:25 -05:00
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
2018-07-26 03:59:19 -05:00
d05e832f29 Add STM32F1 support for SD-based EEPROM 2018-07-06 23:45:47 -05:00
99591dc20c Filter endstops state at all times (#11066) 2018-06-21 20:14:16 -05:00
19d4c7c1cd Tweak HAL header comments 2018-06-13 19:08:42 -05:00
a215725df6 Fix stepper pulse timing
Always honor minimum period on stepper pulse generation, and fix timing calculations

Signed-off-by: etagle <ejtagle@hotmail.com>
2018-06-12 21:34:24 -05:00
4dbec774b5 HAL_*_TIMER_RATE => *_TIMER_RATE 2018-06-12 16:39:12 -05:00
117fd007a9 Followup to pin error change 2018-06-10 19:28:45 -05:00
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
2018-06-01 19:02:22 -05:00
cbcb284f4a Allow libServo::attach to work on Teensy 3.5/3.6 2018-05-28 20:56:24 -05:00
16da5c62d0 Teensy 3.x fastio pullup (#10890) 2018-05-28 16:25:12 -05:00
9b9b62b218 delay(SERVO_DELAY) => safe_delay(servo_delay[servo_index]) 2018-05-28 03:44:32 -05:00
9c235ef821 [HAL]Add support for ST7920 - Teensy 3.x (#10872) 2018-05-27 03:36:57 -05:00
569df3fc0c Fix interrupt-based endstop detection
- Also implemented real endstop reading on interrupt.
2018-05-20 07:10:24 -05:00
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/)
2018-05-20 02:39:34 -05:00
37b15fe4cf Reorder HAL timer header items 2018-05-13 16:50:39 -05:00
c1e5ebbc1e [2.0.x] AVR: Atomic bit set and clear of upper pin ports without critical section (#10502)
* AVR: Atomic bit set and clear

The critical section can be dropped, saving 3 cycles per access. Also simplified pin toggling for all ports.
2018-04-24 13:45:43 -05:00
a3ce8a3fcd Add sanity checks for EMERGENCY_PARSER 2018-04-24 09:24:26 -05:00
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.
2018-04-23 22:05:07 -05:00
cc6d41e1d3 Use a macro for HAL header redirection (#10380) 2018-04-12 20:25:08 -05:00
3c58ca181c [2.0.x] Correct step pulse width on LPC1768, DUE & Teensy35_36 (#10016) 2018-03-09 02:11:28 -06:00
98d48fc731 Followup to HAL_timer_restrain
Followup to #9985
2018-03-07 22:18:37 -06:00
d45f19d385 Remove Unicode from var name 2018-03-07 19:08:44 -06:00
a1a88ebabc HAL function to ensure min stepper interrupt interval (#9985) 2018-03-07 17:53:25 -06:00
a810e585db Drop HAL_timer_set_count 2018-02-20 03:10:39 -06:00
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.
2018-02-10 20:42:00 -06:00
b13099de3f General cleanup of HAL code 2018-02-02 03:37:15 -06:00
21179f8300 Fix the "slow" version of the G-code parser 2018-02-02 00:35:58 -06:00