Commit graph

57 commits

Author SHA1 Message Date
Scott Lahteine
0c85869c26 Clean up file endings 2018-11-04 18:30:10 -06:00
Scott Lahteine
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
Nils Hasenbanck
cafabf2055 Implement DELAY_NS with CYCCNT on Cortex-M7 (#12283) 2018-11-01 16:11:51 -05:00
Scott Lahteine
3583e2b449
Followup to Menu Refactor (#12275) 2018-10-30 16:34:45 -05:00
Scott Lahteine
5580773191
Use FastIO, sanity-check LPC SD options, apply formatting (#12231) 2018-10-26 15:23:02 -05:00
Scott Lahteine
7a04eb3a8b Fix some comment formatting 2018-10-23 22:35:44 -05:00
Scott Lahteine
0bd54392b7 Use uint8_t in EEPROM code 2018-10-09 19:00:01 -05:00
Nils Hasenbanck
191df5e17d Correct PWM_PIN behavior for STM32 HALs (#12027) 2018-10-07 17:08:01 -05:00
Scott Lahteine
33056046a3
STM32 non-generic PWM_PIN and USEABLE_HARDWARE_PWM (#12016) 2018-10-06 00:14:12 -05:00
Scott Lahteine
8489673cea Adjust some HAL formatting 2018-09-30 21:24:37 -05:00
Scott Lahteine
7d5c336c56 Corrections for dylsexic TMC 2018-09-29 18:51:11 -05:00
Scott Lahteine
b682a1961a Tweak STM32F7 TMC2660 class 2018-09-27 21:13:15 -05:00
Scott Lahteine
1718eff54a Code changes supporting up to 6 extruders 2018-09-16 22:32:53 -05:00
Holger Müller
1a6f2b29b8 Add support for Triple-Z steppers/endstops 2018-09-16 00:35:58 -05:00
Sam Lane
d783400330 Updates to STM32F7 HAL, for completeness (#11770) 2018-09-09 03:26:15 -05:00
Scott Lahteine
6a3207391f Remove obsolete HAL_timer_restrain 2018-08-31 16:17:22 -05:00
Scott Lahteine
0987ed2a18 Use American English 2018-08-22 17:16:18 -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
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
Scott Lahteine
64f007580b Fix some header comments 2018-07-17 19:50:24 -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
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
cf53e502a2 No need to set input after attachInterrupt 2018-06-12 18:43:11 -05:00
Scott Lahteine
4dbec774b5 HAL_*_TIMER_RATE => *_TIMER_RATE 2018-06-12 16:39:12 -05:00
Scott Lahteine
a426986df8
Ensure pins set to INPUT after attachInterrupt (#10928) 2018-06-06 20:59:08 -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
etagle
569df3fc0c Fix interrupt-based endstop detection
- Also implemented real endstop reading on interrupt.
2018-05-20 07:10:24 -05:00
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/)
2018-05-20 02:39:34 -05:00
Scott Lahteine
37b15fe4cf Reorder HAL timer header items 2018-05-13 16:50:39 -05:00
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>
2018-05-13 04:52:56 -05:00
Scott Lahteine
d1b619be52 Standardize some hexadecimals 2018-05-08 09:19:18 -05:00
Scott Lahteine
456cf971af HAL FastIO cleanup and fixes 2018-04-26 00:40:16 -05:00
Scott Lahteine
a3ce8a3fcd Add sanity checks for EMERGENCY_PARSER 2018-04-24 09:24:26 -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
Scott Lahteine
dea686cf55
Define short pin names in fastio for STM32 (#10461) 2018-04-20 14:54:35 -05:00
Chris Pepper
cc6d41e1d3 Use a macro for HAL header redirection (#10380) 2018-04-12 20:25:08 -05:00
Scott Lahteine
93305a2d5e Fix some spellings 2018-04-02 03:03:37 -05:00
Scott Lahteine
98d48fc731 Followup to HAL_timer_restrain
Followup to #9985
2018-03-07 22:18:37 -06:00
Scott Lahteine
d45f19d385 Remove Unicode from var name 2018-03-07 19:08:44 -06:00
Chris Pepper
a1a88ebabc HAL function to ensure min stepper interrupt interval (#9985) 2018-03-07 17:53:25 -06:00
Scott Lahteine
f3dbe19669 Tweaks to HAL codestyle 2018-02-25 04:38:17 -06:00
Scott Lahteine
90fa423737
Preliminary cleanup of #include structure (#9763) 2018-02-23 00:52:52 -06:00
Scott Lahteine
a810e585db Drop HAL_timer_set_count 2018-02-20 03:10:39 -06:00