Commit Graph

356 Commits

Author SHA1 Message Date
android444
9c235ef821 [HAL]Add support for ST7920 - Teensy 3.x (#10872) 2018-05-27 03:36:57 -05:00
Bob-the-Kuhn
1c0ad8bbae wrong type of exit method 2018-05-26 08:17:03 -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
Bob Kuhn
235facd545 install AVRDUDE 5.10, faster disk find for LPC1768 (#10849) 2018-05-25 20:26:48 -05:00
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
2018-05-25 04:31:18 -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
Scott Lahteine
4118199ddd Tweaks to core headers 2018-05-21 20:32:18 -05:00
Bob Kuhn
6dfbb39f83 [LPC1768] Add error-handling to upload script, update autobuild.py (#10802) 2018-05-20 21:22:04 -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
c2fb2f54a1 Use assembly for AVR ISR vectors
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-20 01:58:51 -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
c173a31060 Fix some compile warnings 2018-05-19 16:54:48 -05:00
Chris Pepper
9b64fdbc3a [LPC176x] HAL: Add missing program space definition (#10776) 2018-05-19 15:37:54 -05:00
Scott Lahteine
50270b53a0 Clear up some more compile warnings 2018-05-17 18:40:49 -05:00
etagle
40d7e12827 Removing warnings from compilation 2018-05-17 18:04:22 -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
883b0c9880
Convert custom maths to inlines (#10728) 2018-05-13 08:10:08 -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
81b632c255 Additional temp-oriented improvements 2018-05-02 08:43:22 -05:00
nightdemonx
e911635fb1 Add thermocouple with AD8495 support 2018-05-02 08:43:16 -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
456cf971af HAL FastIO cleanup and fixes 2018-04-26 00:40:16 -05:00
J.C. Nelson
5b5e322356 Set Interrupt Priorities and Grouping for STM32F103. (#10517) 2018-04-26 00:21:16 -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
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
f423e54f77 Strip trailing spaces 2018-04-23 18:00:43 -05:00
Scott Lahteine
cb46cb8480
Add HAS_HEATED_BED conditional (#10495) 2018-04-23 17:13:01 -05:00
Scott Lahteine
dea686cf55
Define short pin names in fastio for STM32 (#10461) 2018-04-20 14:54:35 -05:00
Karl Andersson
428c54f2ad [2.0.x] HAL for STM32F4 (#10434) 2018-04-17 17:33:29 -05:00
GMagician
20772492aa Fix compile warnings in AVR fastio.h (#10440) 2018-04-17 17:26:57 -05:00
Chris Pepper
c9aed73987 Fix missed includes from HAL macro patch (#10416) 2018-04-15 18:27:34 -05:00
Scott Lahteine
29dda871cb Patch "upload_disk" to make python happy 2018-04-13 22:27:08 -05:00
Chris Pepper
cc6d41e1d3 Use a macro for HAL header redirection (#10380) 2018-04-12 20:25:08 -05:00
Bob-the-Kuhn
85014cd132 [2.0.x] LPC1768 - automatic selection of upload disk (#10374) 2018-04-11 14:41:16 -05:00
Scott Lahteine
44a697ab04 Set STM32F1 TEMP_TIMER_FREQUENCY to 1K
Responding to https://github.com/MarlinFirmware/Marlin/pull/8833#issuecomment-379426803
2018-04-08 01:08:05 -05:00
Scott Lahteine
9ff4e9e1e6 Patch _IS_HW_SPI so defined() works 2018-04-07 23:29:00 -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
acda4ecb20 Fix DUE Trinamic SW/HW SPI sanity check (#10336) 2018-04-06 22:22:30 -05:00
Bob-the-Kuhn
ab715c70d1 TMC SPI sanity-check and pins debugging (#10324) 2018-04-06 20:24:54 -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
Alexey Shvetsov
cbdc78ec0f Fix STM32 compilation with PlatformIO (#10245) 2018-03-28 18:35:20 -04: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
xC0000005
7dc256432f Restore STM32F1 series to working order. (#10229)
The `_O2` attribute is no longer needed on the malyanlcd function, and the macros have broken timer numbers - reset this to a function to return the right device. Also fix the bit order cast in SPI.
2018-03-28 14:07:52 -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
785dbfc72d [2.0.x] FASTIO consistency (#10164) 2018-03-20 16:24:50 -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
Scott Lahteine
b858c638ad Fix compiler warning for HAL_ANALOG_SELECT 2018-03-13 22:33:21 -05: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
Scott Lahteine
239902f861 Fix E2END and add EEPROM to Smart RAMPS
Reference #9983
2018-03-10 06:57:31 -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
e297748b22 Apply const, safe_delay in servo.* 2018-03-08 19:31:32 -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
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
2057177184 Make enums into implicit char 2018-03-06 23:39:56 -06:00
Scott Lahteine
beeed580b8
Implement digipots for MKS SBASE (#9927)
Fix #9477
2018-03-04 15:14:47 -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
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