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
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
e7e896e7d7
More tweaks to fastio_Due.h
2018-07-04 17:57:47 -05:00
Scott Lahteine
8a8eae8d97
Implement more fastio_Due macros ( #11165 )
2018-07-01 01:24:06 -05:00
Scott Lahteine
fc10101b06
Tweaks to fastio_Due.h
2018-06-30 00:15:50 -05:00
Scott Lahteine
99591dc20c
Filter endstops state at all times ( #11066 )
2018-06-21 20:14:16 -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
4dbec774b5
HAL_*_TIMER_RATE => *_TIMER_RATE
2018-06-12 16:39:12 -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
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
5f8591528e
Remove #pragmas that don't help c files
2018-05-23 23:47:16 -05:00
Scott Lahteine
c89649b46e
Suppress U8glib build warnings
2018-05-23 02:47:36 -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
206014a957
Fix LPC176x timer functions
...
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-20 01:58:51 -05:00
Scott Lahteine
59f7861bcb
Move backtrace to the HAL folder ( #10790 )
2018-05-20 01:33:21 -05:00
Scott Lahteine
50270b53a0
Clear up some more compile warnings
2018-05-17 18:40:49 -05:00
Scott Lahteine
fb608938f8
Prevent compilation of unused u8g-oriented code
2018-05-14 13:31:04 -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
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.
2018-05-13 00:46:23 -05:00
Scott Lahteine
a1062eec5b
Better handling of DELAY_NS and DELAY_US ( #10716 )
...
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-12 08:34:04 -05:00
etagle
1b225a2809
DUE: Emergency parser for the USB CDC
2018-05-12 02:12:11 -05:00
Scott Lahteine
0436e16fb2
Apply shorthand Assembler macros
2018-05-08 10:08:54 -05:00
Scott Lahteine
d1b619be52
Standardize some hexadecimals
2018-05-08 09:19:18 -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
Chris Pepper
cc6d41e1d3
Use a macro for HAL header redirection ( #10380 )
2018-04-12 20:25:08 -05:00
Scott Lahteine
9ff4e9e1e6
Patch _IS_HW_SPI so defined() works
2018-04-07 23:29:00 -05:00
Bob-the-Kuhn
acda4ecb20
Fix DUE Trinamic SW/HW SPI sanity check ( #10336 )
2018-04-06 22:22:30 -05:00
Bob-the-Kuhn
902c885782
Switch to TMC2130 compatible hardware SPI & misc ( #10299 )
2018-04-04 20:13:27 -05:00
Scott Lahteine
93305a2d5e
Fix some spellings
2018-04-02 03:03:37 -05:00
Scott Lahteine
889fd5f71f
Backtrace minor cleanup
2018-03-31 18:59:36 -05:00
Eduardo José Tagle
749f19e502
[2.0.x] Move backtrace to a shared location ( #10237 )
...
- And implement the `backtrace()` function call
2018-03-28 14:13:20 -04:00
etagle
8934a2c49b
Added some missing Thumb instructions to the traceback follower, so now it is able to traceback through switch() statements
2018-03-27 04:30:38 -03:00
etagle
328edea03a
Several fixes to the backtracer. Tested ant it works
2018-03-26 03:42:54 -03:00
ejtagle
9a24c0ae3f
Tons of fixes to the backtracker code, and also added an extra backtracker that does not require unwind tables to work and it is used if unwind tables are absent
2018-03-25 00:52:04 -03:00
Bob-the-Kuhn
f7857ac8a8
Merge pull request #10185 from ejtagle/bugfix-2.0.x
...
[2.0.x] DUE debugging: Solve WDT startup delay, add traceback & crash report uses programming port baud rate
2018-03-24 13:32:34 -05:00
Bob-the-Kuhn
509227fd80
change to mode 0
2018-03-23 09:37:58 -05:00
etagle
c3b23974bd
Added detection of case when no unwind tables are available
2018-03-23 05:22:45 -03:00
etagle
b210bdf032
Now the Crash reporter uses the configured BAUDRATE to send the report through the Programming port. And also shows the traceback of functions as discussed. For that latest feature to work, you need to compile the project with -funwind-tables and -mpoke-function-name compiler flags
2018-03-22 03:34:03 -03:00
etagle
c5730cf711
As Bob-The-Khun suggested, resetting the USB peripheral solves the huge startup delays that happen when a WDT reset happens and we are connected through the native port
2018-03-22 03:31:25 -03:00
Eduardo José Tagle
97e8a6ebd9
Various fixes for DUE... ( #10152 )
...
- Watchdog reset during SD Card initialization.
- Move `DebugMonitor` to `DebugMonitor_Due.cpp`.
- Since the watchdog is enabled on boot do extra resets during init.
- Have `thermalManager` do watchdog reset before its ISR starts to prevent reset.
- Ensure that timers are stopped before reprogramming them to address tone issues.
- Improve SAM3XE reset when reflashed through the native port.
2018-03-21 19:04:45 -05:00
Bob-the-Kuhn
7308ef7809
Add conditional, give DUE SPI a unique name, fix compiler warnings ( #10168 )
2018-03-20 15:53:21 -05:00
Bob-the-Kuhn
53362b81cc
Tone fixes/changes ( #10151 )
2018-03-19 04:48:06 -05:00
Eduardo José Tagle
bbfbf90797
Fix for DUE - no host support on native USB if SD card not enabled ( #10148 )
2018-03-18 19:49:51 -05:00
Bob-the-Kuhn
7f1afbfd60
can't type
2018-03-17 13:07:49 -05:00
Bob-the-Kuhn
23760d6c14
add full speed option
2018-03-17 12:56:44 -05:00
Bob-the-Kuhn
cbcd1ed42d
full speed
2018-03-17 02:57:18 -05:00
etagle
404fc94705
DUE USB CDC: Do not send any character if no program on the PC is listening to them. This avoids Marlin waiting until the user actually opens a program that is able to consume the output of Marlin
2018-03-15 00:56:28 -03:00
Bob-the-Kuhn
c4467da53a
Merge pull request #10063 from ejtagle/bugfix-2.0.x
...
[2.0.x] DUE - add programming capability to native port
2018-03-13 22:07:21 -05:00
Scott Lahteine
36452b4d6e
Fix filename HAL/DUE/servotimers.h => ServoTimers.h
2018-03-13 01:38:37 -05:00
ejtagle
703c8ac0ef
Added Arduino-compatible kludge to the (ATMEL supplied) SAM3X USB stack we are now using so the Native port is also usable as a programming port on Arduino DUE and derived designs
2018-03-11 15:17:55 -03:00
Scott Lahteine
dd19e74476
Cleanup trailing whitespace
...
@Bob-the-Kuhn — Please set your git options to remove trailing whitespace on commit.
2018-03-11 10:29:00 -05:00
Bob-the-Kuhn
0d8c15c01f
restore PR 9661 files & V1 fix
2018-03-10 22:46:32 -06:00
Bob-the-Kuhn
bf59a4a6df
Revert "[2.0.x] DUE compatibility with shared SPI LCDs, USB mass storage, add pin defs & update examples\MakerParts\Configuration.h"
2018-03-10 17:22:20 -06:00
Bob-the-Kuhn
914bb80bde
removed SDSS init
...
added device & comm drivers for shared SPI LCDs
mistyped some updates in ultralcd_impl_DOGM.h
remove unwanted changes in onfiguration.h
still can't type
Update HAL_LCD_class_defines.h
include USB mass storage & misc
2018-03-09 23:06:11 -06:00
Bob-the-Kuhn
67a17446f2
Fix DUE incompatible enum type specification ( #10017 )
2018-03-09 02:17:57 -06:00
Bob-the-Kuhn
3c58ca181c
[2.0.x] Correct step pulse width on LPC1768, DUE & Teensy35_36 ( #10016 )
2018-03-09 02:11:28 -06:00
Scott Lahteine
98d48fc731
Followup to HAL_timer_restrain
...
Followup to #9985
2018-03-07 22:18:37 -06:00
Scott Lahteine
ca577c1638
Fix up various spacing, comments, and typos
2018-03-07 21:09:08 -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
2057177184
Make enums into implicit char
2018-03-06 23:39:56 -06:00
Scott Lahteine
649f375494
Fix: M112 calling kill from interrupt ( #9923 )
...
Fix #9906
2018-03-03 23:14:01 -06:00
Scott Lahteine
cfdcf91df5
Fix compile error with initTone
2018-02-26 01:49:48 -06:00
Scott Lahteine
f2c0ed193d
Add tone support for Due ( #9807 )
2018-02-25 10:48:14 -06:00
Scott Lahteine
61688233c7
HAL style tweak
2018-02-25 05:00:44 -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
Scott Lahteine
0106c3e476
Style tweak in MarlinSerialUSB_Due.h
2018-02-19 06:58:26 -06:00
Scott Lahteine
1bf2b1e475
Use serial macro in sd_mmc_spi_mem.cpp for Due
2018-02-16 17:57:24 -06:00
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.
2018-02-10 20:42:00 -06:00
Bob-the-Kuhn
428f164d02
[2.0.x] Bug fix - "M114 D" and Due (dtostrf C linkage) ( #9481 )
2018-02-04 16:11:27 -06:00
Scott Lahteine
c46de340b7
Clean up trailing whitespace
2018-02-03 20:05:23 -06:00
Bob-the-Kuhn
a0570ff1eb
Fix caselight on Due ( #9364 )
2018-02-02 04:13:33 -06:00
Bob-the-Kuhn
c6e01ebd52
never mind ...
2018-01-25 22:13:32 -06:00
Bob-the-Kuhn
ab709ccac1
add USEABLE_HARDWARE_PWM & clear up some compiler warnings
2018-01-24 21:42:36 -06:00
Roxy-3D
7c469c0712
Suggested change to fix Due compile problem
2018-01-18 23:00:03 -06:00
Scott Lahteine
ac368f2788
Add STEPPER_ISR_ENABLED() to HALs
...
Some also get a `HAL_timer_interrupt_enabled` function.
2018-01-14 21:07:10 -06:00
Thomas Moore
84de428d30
[2.0.x] Fix compile errors ( #9141 )
...
* Update persistent_store_impl.cpp
* Remove define BYTE from serial functions since Arduino docs typically show 0 for the normal case.
2018-01-11 21:43:26 -06:00
Scott Lahteine
6a043eee55
Various updates for TMC support
2018-01-10 23:04:48 -06:00
Scott Lahteine
d7fd78cb91
Merge pull request #8148 from tcm0116/2.0.x-multi_host
...
[2.0.x] Add multi-host support
2018-01-10 02:38:59 -06:00
teemuatlut
a8c446c3bc
[2.0.x]DUE: Fix includes for SDSUPPORT ( #9112 )
2018-01-10 00:46:34 -06:00
Thomas Moore
f7efac57b7
Multi-host support
2018-01-10 00:14:47 -06:00
Scott Lahteine
51e0f2bee3
Add MarlinSettings::validate()
2018-01-05 14:35:24 -06:00
Scott Lahteine
1c41de16d4
Trailing whitespace clean
2018-01-05 10:11:31 -06:00
Bob-the-Kuhn
4626d04067
as good as i can get it
...
minor edits to force new Travis test (last one timed out)
Update u8g_com_HAL_DUE_st7920_sw_spi.cpp
initial power up display garbage gone
2018-01-03 22:46:31 -06:00
Bob-the-Kuhn
e5b71af8c9
snapshot
...
found a few more nasties
2018-01-03 10:41:23 -06:00
revilor
959a2d2527
Add beginTransaction to HAL SPI ( #9019 )
2018-01-03 05:12:25 -06:00
Bob-the-Kuhn
adb9ecf3cc
copy of PR #8990
2018-01-01 16:11:56 -06:00
etagle
729a9f55fc
Improved Sw SPI on DUE HAL a bit more.
...
Now the USB MSD can transfer at 750k/s. Previously, it was 500k/s. I think this is the maximum achievable speed using Sw SPI.
2017-12-30 17:24:38 -06:00
Scott Lahteine
2c4e03d2cf
Indentation of a SW SPI file
2017-12-25 09:34:43 -06:00