Commit graph

107 commits

Author SHA1 Message Date
Scott Lahteine 6a3207391f Remove obsolete HAL_timer_restrain 2018-08-31 16:17:22 -05:00
Chris Pepper 5573ef62c6 [2.0.x] PersistentStore update followup (#11549) 2018-08-14 17:54:12 -05:00
Scott Lahteine 834ea7fcea Remove 'const' from PersistentStore::capacity 2018-08-14 04:46:10 -05:00
Dave Johnson c64199941e Compile only selected PIO environment (#11519) 2018-08-14 03:28:52 -05:00
Scott Lahteine 865ee5985f Followup persistent store with heading, const 2018-08-13 23:55:33 -05:00
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
2018-08-13 17:30:25 -05:00
Scott Lahteine 244b9a8257 Better fastio 1280/2560 pin list
Co-Authored-By: bleughb <36889022+bleughb@users.noreply.github.com>
2018-07-26 05:23:51 -05:00
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
2018-07-26 03:59:19 -05:00
teemuatlut fbcdf5eaeb Simplify stepper driver per-axis selection 2018-07-25 02:47:43 -05:00
Scott Lahteine d05e832f29 Add STM32F1 support for SD-based EEPROM 2018-07-06 23:45:47 -05:00
etagle 1367df2875 Replace double with float, optimize calculation 2018-07-04 22:28:56 -05:00
Scott Lahteine 99591dc20c
Filter endstops state at all times (#11066) 2018-06-21 20:14:16 -05:00
Scott Lahteine c1269c2ec1 Tweak AVR critical section defines 2018-06-16 17:42:32 -05:00
Scott Lahteine 19d4c7c1cd Tweak HAL header comments 2018-06-13 19:08:42 -05:00
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>
2018-06-12 21:34:24 -05:00
Scott Lahteine a9861a780e Tweak HAL heading 2018-06-12 19:40:17 -05:00
Scott Lahteine 4dbec774b5 HAL_*_TIMER_RATE => *_TIMER_RATE 2018-06-12 16:39:12 -05:00
Eduardo José Tagle 5590c8ffd0 Fix MarlinSerial (AVR) (#10991)
An undocumented hw bug makes the UART lose chars when RX ISR is disabled, even for a very small amount of time. This happens when RX_BUFFER > 256, and the result is corrupted received commands. Solved by implementing pseudo-atomic operations on 16bit indices.
2018-06-10 20:32:20 -05:00
etagle 99af086cea Add hidden Serial overflow debug options 2018-06-10 04:25:42 -05:00
etagle d90e8fcad9 Fix XON/XOFF implementation
Pointed out by @GMagician
2018-06-10 04:25:42 -05:00
Scott Lahteine 3701869e6c Add HAL_timer_start for AVR, use stepper timer to time pulses 2018-06-09 22:30:13 -05:00
Giuliano c9d1a620d4 [2.0.x] fix indentations (#10934) 2018-06-05 02:03:26 -05:00
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
2018-06-01 19:02:22 -05:00
Scott Lahteine 9b9b62b218 delay(SERVO_DELAY) => safe_delay(servo_delay[servo_index]) 2018-05-28 03:44:32 -05:00
Eduardo José Tagle 6f330f397e [2.0.x] Buffer overflow and scroll fix, UTF8 cleanup (#10844) 2018-05-25 23:32:37 -05:00
Scott Lahteine 4118199ddd Tweaks to core headers 2018-05-21 20:32:18 -05:00
etagle 569df3fc0c Fix interrupt-based endstop detection
- Also implemented real endstop reading on interrupt.
2018-05-20 07:10:24 -05:00
Scott Lahteine c2fb2f54a1 Use assembly for AVR ISR vectors
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-20 01:58:51 -05:00
Scott Lahteine c173a31060 Fix some compile warnings 2018-05-19 16:54:48 -05:00
Scott Lahteine 37b15fe4cf Reorder HAL timer header items 2018-05-13 16:50:39 -05:00
Scott Lahteine 883b0c9880
Convert custom maths to inlines (#10728) 2018-05-13 08:10:08 -05:00
Scott Lahteine 0436e16fb2 Apply shorthand Assembler macros 2018-05-08 10:08:54 -05:00
Scott Lahteine 3f68203324 Modify FastIO error message 2018-04-28 20:27:36 -05:00
Scott Lahteine a474a7e675 Correct AVR_ATmega328_FAMILY macro
…as with #10540

Co-Authored-By: per1234 <per1234@users.noreply.github.com>
2018-04-27 03:13:46 -05:00
Scott Lahteine 2578996631
[2.0.x] Emergency parser for multiple serial ports (#10524) 2018-04-25 20:58:00 -05:00
Chris Pepper 2242b98248 [LPC176x] Emergency Parser Feature (#10516) 2018-04-25 06:44:26 -05:00
Eduardo José Tagle 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
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.
2018-04-23 22:05:07 -05:00
GMagician 20772492aa Fix compile warnings in AVR fastio.h (#10440) 2018-04-17 17:26:57 -05:00
Chris Pepper cc6d41e1d3 Use a macro for HAL header redirection (#10380) 2018-04-12 20:25:08 -05:00
Lenbok 0e8242180d Chamber temperature monitoring and auto fan control.
This is an initial cut for feedback, updated for 2.0.x.

Chamber temperature is currently reported along with hot end and bed
temperatures to serial. The format is just like that used for hot end
and bed temperatures, but using 'C' prefix. As there is no heater,
target is always 0. Is this appropriate, is there a better way to report
chamber temperatures?

Chamber temperatures are not reported on the LCD in any way.

When auto chamber fan is enabled, it currently just uses the same
temperature threshold as the other auto controlled fans.

As the chamber temperature is not connected to any heater, it doesn't
undergo mintemp/maxtemp monitoring. This would need to change in the
future if chamber heating became a feature.
2018-04-06 23:09:06 -05:00
Bob-the-Kuhn 785dbfc72d [2.0.x] FASTIO consistency (#10164) 2018-03-20 16:24:50 -05:00
Scott Lahteine b858c638ad Fix compiler warning for HAL_ANALOG_SELECT 2018-03-13 22:33:21 -05:00
Scott Lahteine 98d48fc731 Followup to HAL_timer_restrain
Followup to #9985
2018-03-07 22:18:37 -06:00
Scott Lahteine 224688cc3b Fix for unicode-ignorant gcc preprocessor 2018-03-07 18:34:07 -06:00
Chris Pepper a1a88ebabc HAL function to ensure min stepper interrupt interval (#9985) 2018-03-07 17:53:25 -06:00
Scott Lahteine 649f375494
Fix: M112 calling kill from interrupt (#9923)
Fix #9906
2018-03-03 23:14:01 -06:00
Ben Lye 461c8ef834 Fix DIGITAL_PIN_TO_ANALOG_PIN macro for Atmega1284p (#9881) 2018-03-01 15:13:57 -06:00
Bob-the-Kuhn c1f4112bdc [2.0.x] Add 1284 support & misc. bug fixes (#9864) 2018-03-01 03:07:39 -06:00
Scott Lahteine 0bc4c216ac Patch up pinsDebug pins 2018-02-26 19:32:48 -06:00