Commit Graph

1213 Commits

Author SHA1 Message Date
c685c7b7dd STM32F4: All pins can do PWM 2018-06-03 04:30:15 -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
d87257f63c [2.0.x][LPC176x] Fix PIO build flags (#10909)
Don't build and link with different flags, the binary may not work.
2018-05-31 19:08:31 -05:00
cbcb284f4a Allow libServo::attach to work on Teensy 3.5/3.6 2018-05-28 20:56:24 -05:00
f89f7c4a82 [2.0.x][LPC176x][Build] Force single precision constants, disable freestanding (#10892) 2018-05-28 19:38:22 -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
1c0ad8bbae wrong type of exit method 2018-05-26 08:17:03 -05:00
6f330f397e [2.0.x] Buffer overflow and scroll fix, UTF8 cleanup (#10844) 2018-05-25 23:32:37 -05:00
235facd545 install AVRDUDE 5.10, faster disk find for LPC1768 (#10849) 2018-05-25 20:26:48 -05:00
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
5f8591528e Remove #pragmas that don't help c files 2018-05-23 23:47:16 -05:00
c89649b46e Suppress U8glib build warnings 2018-05-23 02:47:36 -05:00
4118199ddd Tweaks to core headers 2018-05-21 20:32:18 -05:00
6dfbb39f83 [LPC1768] Add error-handling to upload script, update autobuild.py (#10802) 2018-05-20 21:22:04 -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
c2fb2f54a1 Use assembly for AVR ISR vectors
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-20 01:58:51 -05:00
206014a957 Fix LPC176x timer functions
Co-Authored-By: ejtagle <ejtagle@hotmail.com>
2018-05-20 01:58:51 -05:00
59f7861bcb Move backtrace to the HAL folder (#10790) 2018-05-20 01:33:21 -05:00
c173a31060 Fix some compile warnings 2018-05-19 16:54:48 -05:00
9b64fdbc3a [LPC176x] HAL: Add missing program space definition (#10776) 2018-05-19 15:37:54 -05:00
50270b53a0 Clear up some more compile warnings 2018-05-17 18:40:49 -05:00
40d7e12827 Removing warnings from compilation 2018-05-17 18:04:22 -05:00
fb608938f8 Prevent compilation of unused u8g-oriented code 2018-05-14 13:31:04 -05:00
37b15fe4cf Reorder HAL timer header items 2018-05-13 16:50:39 -05:00
883b0c9880 Convert custom maths to inlines (#10728) 2018-05-13 08:10:08 -05:00
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
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
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
1b225a2809 DUE: Emergency parser for the USB CDC 2018-05-12 02:12:11 -05:00
0436e16fb2 Apply shorthand Assembler macros 2018-05-08 10:08:54 -05:00
d1b619be52 Standardize some hexadecimals 2018-05-08 09:19:18 -05:00
81b632c255 Additional temp-oriented improvements 2018-05-02 08:43:22 -05:00
e911635fb1 Add thermocouple with AD8495 support 2018-05-02 08:43:16 -05:00
3f68203324 Modify FastIO error message 2018-04-28 20:27:36 -05:00
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
456cf971af HAL FastIO cleanup and fixes 2018-04-26 00:40:16 -05:00
5b5e322356 Set Interrupt Priorities and Grouping for STM32F103. (#10517) 2018-04-26 00:21:16 -05:00
2578996631 [2.0.x] Emergency parser for multiple serial ports (#10524) 2018-04-25 20:58:00 -05:00
2242b98248 [LPC176x] Emergency Parser Feature (#10516) 2018-04-25 06:44:26 -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
f423e54f77 Strip trailing spaces 2018-04-23 18:00:43 -05:00
cb46cb8480 Add HAS_HEATED_BED conditional (#10495) 2018-04-23 17:13:01 -05:00
dea686cf55 Define short pin names in fastio for STM32 (#10461) 2018-04-20 14:54:35 -05:00
428c54f2ad [2.0.x] HAL for STM32F4 (#10434) 2018-04-17 17:33:29 -05:00
20772492aa Fix compile warnings in AVR fastio.h (#10440) 2018-04-17 17:26:57 -05:00