Commit Graph

177 Commits

Author SHA1 Message Date
victorpv
a5150c83a2 [2.0.x] Multiple updates to STM32F1 HAL (#8733)
* STM32F1 HAL

Adding files for STM32F1 HAL based on libmaple/stm32duino core.
Current persistent_store uses cardreader changes to be sent in separate
commit, but could be changed to use i2c eeprom.
There is another persistent_store implementation that uses the MCU flash memory
to emulate eeprom
Adding readme with some information about the stm32 HAL.

* Switch to Timer4 to avoid a hard reset on STM32F103C6 boards

On bluepill STM32F103C6 boards, using Timer5 results in a error() vector call. Switch to 4 since these are both general purpose, 16 bit timers.

* Add support for EEPROM emulation using Flash

Some low end machines doe not have EEPROM support. Simulate it using the last two pages of flash. Flash does not allow rewrite between erases, so skip writing the working version if that's enabled.

* Basic Pins for a malyan M200

This is a work in progress to go hand in hand with the STM32 work.

* Add support for ADC with DMA. This work has exposed a problem with the pin enumerations in STM boards vs what marlin expects (i.e, try defining PA0 as a temp pin). The hack can be removed with we go to fastio completely. To see this work, set something in adc_pins to a value like PA0 and connect your pullup resistor'd thermistor.

* Missing file - change HAL_adc_init to actually do something

We have an actual ADC init function now.

* Remove pinmode hack

Remove the pin mode hack that I was using to init PA0.

Updated Readme.md

* Several changes to timers and GPIO

Faster GPIO, and faster timer functions by accesing registers and
libmaple.
Still more changes pending for the Timer's code to skip using the
HardwareTimer class altogether.

Switch all enums to be within #defines

This change allows a user to have, for instance, TEMP_4 and TEMP_BED definied but nothing else. The enums which are not defined move "out", allowing the first ones to take the slots in the enum, and since the array is sized on ADC_PIN_COUNT, we always have the right size data and in order.

* Update Malyan M200 pins

Update Malyan M200 pins with correct fan values.

* Test all pins on actual hardware, update definitions

Some of the pin definitions were from knowlege base/pdfs. Now they've been tested against actual hardware. This should be very close to final.

* Update HAL_timers_Stm32f1.cpp

* Add sample configurations for Malyan M200

Add sample configuration for Malyan M200 without bed leveling, and move fan to auto cool E0 since this printer by default has only one fan.


Choose the timer based on MCU defintion. Timer5 is not valid on C8/CB class boards, so use Timer4 for the step timer.


readme.md update

* Updates to timers, and some stm32 boards definitiions

* Correct pin toggle macro.

* Remove duplicated Malyan M200 entry from pins.h

* Update configuration_store.cpp

* Formatting, indentation

* Formatting in HAL_Stm32f1.cpp
2017-12-10 23:12:45 -06:00
Scott Lahteine
204199e1ce Only compare XYZ to check motion 2017-12-10 23:00:00 -06:00
Scott Lahteine
6686d937fb Always report position on config load/reset 2017-12-10 21:47:14 -06:00
Scott Lahteine
03ba79f144 Sync and report changed position 2017-12-10 21:39:49 -06:00
Scott Lahteine
5cf6a062e3 Reset timer count before first block step 2017-12-10 18:38:53 -06:00
Scott Lahteine
82ef6b5242 Add an option to specify "pulse" timer 2017-12-10 18:38:53 -06:00
Scott Lahteine
4fa65a5c25 TCNT0 => HAL_timer_get_current_count
Fix #8710
2017-12-08 22:35:28 -06:00
AnHardt
b3daf6b5db [2.0.x] better reverse pass (#8722)
* repair reverse_pass()

And make it readeble.
This was broken a long time ago.
Not competely unfunctional but far from optimal.

* Minor speedup when calling calculate_trapezoid_for_block

2 float / to 1 foat / and 2 float *

* Various style changes
2017-12-08 21:38:45 -06:00
Bob-the-Kuhn
65d0f32f82 divide only when required 2017-12-08 18:14:27 -06:00
Scott Lahteine
728acf521c Followup to #8706 2017-12-08 03:49:33 -06:00
Scott Lahteine
85c6ffbe0d Discard all "continued" blocks on interrupted move 2017-12-08 02:32:58 -06:00
Scott Lahteine
4e891e9fb7 Followup to #8698 2017-12-08 01:01:12 -06:00
Scott Lahteine
de3d3b9cb1 Put FORCE_INLINE before static 2017-12-08 00:46:22 -06:00
Scott Lahteine
ae663a4198 PROBE_DOUBLE_TOUCH => MULTIPLE_PROBING 2017-12-07 16:44:13 -06:00
Scott Lahteine
3cd7659924 Improved Core-compatible jerk code 2017-12-06 23:57:57 -06:00
Scott Lahteine
81c0a918af feed_factor => inverse_secs 2017-12-06 23:03:33 -06:00
Scott Lahteine
9898b96992 No lcd_map_control flag in quick_stop 2017-12-06 22:23:34 -06:00
Scott Lahteine
840289e7cc Use block cleaning instead of split flag 2017-12-06 22:22:58 -06:00
Scott Lahteine
2fde60da12 Changes for parity with 1.1.x 2017-12-06 21:50:54 -06:00
Scott Lahteine
6040d4080e Cleanup stepper ISR. Allow cleaning for endstops. 2017-12-06 21:23:37 -06:00
Scott Lahteine
a4e1d83599 Fix M503 S parameter 2017-12-06 21:23:37 -06:00
AnHardt
a993c5227d Don't split first_move while homing or probing
While homing or probing it might be bad if the stop/trobe triggers during the first part and the second is still in the buffer.
2017-12-06 14:13:05 +01:00
Scott Lahteine
5fbb2f121e Remove skew warning that could crash the planner 2017-12-05 20:27:20 -06:00
Richard Wackerbarth
c1184552ac Change K1 to required option PID_K1 2017-12-05 19:59:59 -06:00
Scott Lahteine
d8b444c144 Cleanup constextpr in planner.cpp 2017-12-05 18:55:57 -06:00
Scott Lahteine
a2372cfab5 Fix SKEW_CORRECTION without leveling 2017-12-05 18:48:34 -06:00
Scott Lahteine
b27bc67271 Set initial endstops state 2017-12-05 01:10:31 -06:00
Scott Lahteine
53694ebaa1 Folllwup to planner splitting 2017-12-04 18:55:23 -06:00
Scott Lahteine
4b612f590c Split first move to planner for better chaining 2017-12-04 15:27:47 -06:00
Scott Lahteine
dd8febca1a Revert "Merge pull request #8611 from thinkyhead/bf2_planner_split_first"
This reverts commit 824980e70e, reversing
changes made to aa7efb96bf.
2017-12-03 17:50:19 -06:00
Scott Lahteine
3a97de52ef Split first move to planner for better chaining
Address #8573, #8595
2017-12-03 01:27:14 -06:00
Scott Lahteine
63a91cd37a Fix a homing comment 2017-12-02 21:02:37 -06:00
Scott Lahteine
8056120195 Rename inverse_mm_s => inverse_secs 2017-12-02 20:28:09 -06:00
Scott Lahteine
23557f8e77 Remove obsolete de_float 2017-12-02 20:23:10 -06:00
Jonathan Barchi
05f8e98c4a Fix for issue #8629 - mismatch between number of stored and loaded dummy items on non-delta machines. (#8631) 2017-12-02 19:04:58 -06:00
Scott Lahteine
000b3b3117 Comment/cleanup of motion code 2017-12-02 01:09:55 -06:00
Scott Lahteine
45c2388a58 Apply const to thermal_runaway_protection args 2017-12-01 19:42:44 -06:00
Scott Lahteine
0154e3480c New feature: BED_SKEW_CORRECTION 2017-12-01 19:39:49 -06:00
Scott Lahteine
91fb6231b2 Fix EEPROM V45 header, layout 2017-11-30 22:45:17 -06:00
Scott Lahteine
dd3ce40826 Drop Planner::position_float, use int types 2017-11-30 17:43:31 -06:00
Scott Lahteine
ec6ca37ed3 Fix (un)apply_leveling fade bug 2017-11-30 17:25:44 -06:00
Scott Lahteine
a52fec6ac4 Planner class parity with 1.1.x 2017-11-30 15:55:08 -06:00
Scott Lahteine
23e45fa3c4 Apply const to some planner vars 2017-11-29 21:02:55 -06:00
Scott Lahteine
ef2531558c Add an option to segment leveled moves 2017-11-29 16:57:30 -06:00
Scott Lahteine
285b868e9b Tweak planner code style 2017-11-29 15:22:18 -06:00
Scott Lahteine
1f2acc33bc Tweaks for check_axes_activity 2017-11-28 18:41:13 -06:00
Scott Lahteine
a8aa43ce2d
Merge pull request #8587 from AnHardt/2_Fix_WDTO_during_long_DELTA_moves
[2.0.x] Fix WDTO during long delta moves
2017-11-28 17:29:18 -06:00
Scott Lahteine
16baa48699 Fix #8579
Fan speed code fell into a curly brace
2017-11-28 16:12:14 -06:00
AnHardt
02aa93a6ad Fix Watchdog time out during long lasting DELTA moves
During long lasting moves of a delta machine neither the temperatures are maintained nor buttons checked nor ... .
The fix is to call 'manage_heater()' and 'idle()' every now and then in the loop where the move is segmented. 
The code is abot the same as in G2_G3 wher we had the same problem with too large circles lasting too long.
Fixing #7510
2017-11-28 17:03:51 +01:00
Scott Lahteine
fadf9eb2d7 Simplify midpos calculation 2017-11-27 14:00:35 -06:00