Commit Graph

224 Commits

Author SHA1 Message Date
dfe18ac633 Fix compilation error for STM32F1 with U8GLIB_SSD1306 or U8GLIB_SH1106 enabled (#11583)
The `binary.h` file required by `lcd/dogm/dogm_bitmaps.h` is not present in stm32duino environment. Binary macros are defined in `bit_constants.h` in stm32duino framework.
2018-08-20 20:37:56 -05:00
0b2d686160 Fix "SD init fail" problem for STM32F1 (#11579)
Fix "SD init fail" problem for STM32F1 caused by incorrect SS pin state and incorrect SPI mode. Issue #11225
2018-08-17 23:27:10 -05:00
834ea7fcea Remove 'const' from PersistentStore::capacity 2018-08-14 04:46:10 -05:00
c64199941e Compile only selected PIO environment (#11519) 2018-08-14 03:28:52 -05:00
865ee5985f Followup persistent store with heading, const 2018-08-13 23:55:33 -05:00
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
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
d05e832f29 Add STM32F1 support for SD-based EEPROM 2018-07-06 23:45:47 -05:00
ffdbc1f42c STM32F1: Fix SD card persistent store API (#11090) 2018-06-26 14:41:23 -04:00
99591dc20c Filter endstops state at all times (#11066) 2018-06-21 20:14:16 -05:00
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
cf53e502a2 No need to set input after attachInterrupt 2018-06-12 18:43:11 -05:00
e0276d2f32 Official STMicroelectronics Arduino Core STM32F4 HAL compatibility (#11006) 2018-06-12 18:38:00 -05:00
4dbec774b5 HAL_*_TIMER_RATE => *_TIMER_RATE 2018-06-12 16:39:12 -05:00
9b945c13a1 Fix STM32F1 ISR_ENABLED 2018-06-11 22:09:45 -05:00
2ddba201c0 STM32F1 HAL Fixes (#10999)
- Enable / disable interrupts with `__iSeiRetVal` / `__iCliRetVal`
- Add STM32F1 to Travis CI tests
2018-06-11 20:00:56 -05:00
a426986df8 Ensure pins set to INPUT after attachInterrupt (#10928) 2018-06-06 20:59:08 -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
cbcb284f4a Allow libServo::attach to work on Teensy 3.5/3.6 2018-05-28 20:56:24 -05:00
9b9b62b218 delay(SERVO_DELAY) => safe_delay(servo_delay[servo_index]) 2018-05-28 03:44:32 -05:00
569df3fc0c Fix interrupt-based endstop detection
- Also implemented real endstop reading on interrupt.
2018-05-20 07:10:24 -05:00
37b15fe4cf Reorder HAL timer header items 2018-05-13 16:50:39 -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
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
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
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
cb46cb8480 Add HAS_HEATED_BED conditional (#10495) 2018-04-23 17:13:01 -05:00
cc6d41e1d3 Use a macro for HAL header redirection (#10380) 2018-04-12 20:25:08 -05:00
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
cbdc78ec0f Fix STM32 compilation with PlatformIO (#10245) 2018-03-28 18:35:20 -04:00
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
98d48fc731 Followup to HAL_timer_restrain
Followup to #9985
2018-03-07 22:18:37 -06:00
d45f19d385 Remove Unicode from var name 2018-03-07 19:08:44 -06:00
a1a88ebabc HAL function to ensure min stepper interrupt interval (#9985) 2018-03-07 17:53:25 -06:00
2057177184 Make enums into implicit char 2018-03-06 23:39:56 -06:00
90fa423737 Preliminary cleanup of #include structure (#9763) 2018-02-23 00:52:52 -06:00
a810e585db Drop HAL_timer_set_count 2018-02-20 03:10:39 -06:00
272f132b82 Remove stray ` from STM32F1 HAL
As noted in #8585
2018-02-14 01:06:37 -06:00
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
3d72fe0730 snapshot 2018-02-03 21:28:05 -06:00
fb044b6a64 Fix HAL_timer_set_current_count for STM32F1 2018-01-20 14:57:17 -06:00
a8638aa20d Update STM32F1 timer code to use libmaple bb_perip 2018-01-20 14:56:57 -06:00
42933c804a Cleanups for STM32F7 2018-01-15 02:46:37 -06:00
ac368f2788 Add STEPPER_ISR_ENABLED() to HALs
Some also get a `HAL_timer_interrupt_enabled` function.
2018-01-14 21:07:10 -06:00
f7efac57b7 Multi-host support 2018-01-10 00:14:47 -06:00
51e0f2bee3 Add MarlinSettings::validate() 2018-01-05 14:35:24 -06:00