Commit Graph

168 Commits

Author SHA1 Message Date
Scott Lahteine
303d792b9f
Merge pull request #9253 from tcm0116/2.0.x-mks_sbase
[2.0.x] Cleanup MKS-SBASE compile warnings
2018-01-19 22:37:38 -06:00
Scott Lahteine
f2ea8a0529
Merge pull request #9197 from p3p/pr_bf2_operation_freemem
[2.0.x] LPC1768: Free up some RAM
2018-01-19 22:35:45 -06:00
Thomas Moore
63fd23ab1c Cleanup MKS-SBASE compile warnings 2018-01-19 15:46:34 -06:00
Bob-the-Kuhn
11e68541b0
Merge pull request #9245 from Bob-the-Kuhn/TMC2208-sanity-check-2.0.x
[2.0.x] add TMC2208 sanity check to AVR
2018-01-19 15:42:53 -06:00
Bob-the-Kuhn
0ea9cdf4f2 TMC2208 sanity check 2018-01-19 12:19:34 -06:00
Roxy-3D
7c469c0712
Suggested change to fix Due compile problem 2018-01-18 23:00:03 -06:00
Roxy-3D
bfd9728cf4
Serial buffer over run work around for v2.0.0 (#9236)
* Work around for serial buffer over run

PronterFace sends a lot of M105 commands.  During long operations such
as UBL's G29 P1, G29 P2, G29 P4 and G26 this can over run the serial
buffer.   This results (very often) in a M1 (actually a M1M105) ending
up in the command queue.

Until we figure out a better way to resolve this issue, this will keep
the UBL commands from experiencing bogus commands at thier completion.
2018-01-18 19:57:18 -06:00
Christopher Pepper
1e65562d55 LPC1768: HAL: only initialise used HardwareSerial ports
Misc formatting
2018-01-15 22:00:59 +00:00
Scott Lahteine
d5bf9e74c4
Merge pull request #8996 from p3p/pr_bf2_more_adc_filter
[2.0.x] PID control fix and more LPC1768 ADC filtering
2018-01-15 05:14:25 -06:00
Scott Lahteine
2c18faf3e4 General cleanups for HAL 2018-01-15 02:46:37 -06:00
Scott Lahteine
42933c804a Cleanups for STM32F7 2018-01-15 02:46:37 -06:00
Morten
a0246c5c96 Add support for STM32F7 MCU 2018-01-15 01:13: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
Scott Lahteine
742cff5f3c Followup to #9141 2018-01-11 22:15:01 -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
Bob-the-Kuhn
6a50adb4d5 works 2018-01-09 22:15:33 -06:00
Christopher Pepper
14dcad6bbc LPC1768: Increase ADC median filter from 3 values to 23
Clarify the HAL_adc_get_result method to make sure correct values enter the filters

HAL: Fix the PID control loop for non-AVR platforms
2018-01-07 22:15:20 +00:00
Scott Lahteine
51e0f2bee3 Add MarlinSettings::validate() 2018-01-05 14:35:24 -06:00
Scott Lahteine
3319765034 Detab some HAL files 2018-01-05 10:28:17 -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
eca5cc8669
Merge pull request #9003 from Bob-the-Kuhn/Due-PINS_DEBUG-&-related
[2.0.x] add Due PINS_DEBUG support & misc improvements (replaces PR #8990)
2018-01-02 18:47:53 -06:00
Bob-the-Kuhn
5574fad69c copy of PR #8991 code
Formatting tweaks

correct array initialization & remove test code
2018-01-02 11:17:46 -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
Scott Lahteine
1a827d5b68 Opening brace tweaks 2017-12-25 09:34:43 -06:00
Bob-the-Kuhn
a142fab155 Enable RRDFGSC on Due 2017-12-25 09:22:14 -06:00
Bob-the-Kuhn
1a948cbd93 Fix SET_OUTPUT glitch - LPC1768 & DUE 2017-12-24 19:25:32 -06:00
etagle
33a6fc70e4 Adding USB MSD implementation to the HAL: Now, when you plug the Native USB port of the Arduino DUE to your PC, it will be detected as a composite USB device: One of the devices is a USB CDC (Serial port over USB) with native USB handshake (no more overflows!!) (set SERIAL_PORT to -1 to use it as main serial port) and also, a MSD (USB Mass Storage Device) will be detected, and the SD card present on the socket will be reflected as a Removable disk on your PC) 2017-12-21 02:42:46 -03:00
etagle
d8a4db72ac Reimplemented SW SPI for DUE in assembler. This allows to reach 12Mhz as SPI Clock and improves 4x the transfer speed to the SD card. This is REQUIRED so access to SD from USB is usable (allows 600Kbytes/second transfer speeds) 2017-12-21 02:35:49 -03:00
victorpv
2ec4113cb2 Changes to STM32F1 HAL (#8833)
Some to correct missing files from previous PR to completely avoid
HardwareTimer Class (reduce overhead). Some changes to formatting.
Changes to DMA ADC to work correctly.
Change to F1 sanity check.
2017-12-20 16:16:36 -06:00
Scott Lahteine
fc9ee1a4de Fix up serial sanity check 2017-12-19 19:11:43 -06:00
Scott Lahteine
097a26007f Fix SDSUPPORT for MKS SBASE
Fix supplied by @cjsoong in https://github.com/MarlinFirmware/Marlin/issues/8750#issuecomment-350779983
2017-12-17 03:05:33 -06:00
Scott Lahteine
8b12371e45 Change some hex case 2017-12-15 15:47:22 -06:00
Scott Lahteine
a641992c1d
Merge pull request #8762 from victorpv/patch-2
[2.0.x] STM32F1 HAL: Fix issue #8585. Updates to readme.
2017-12-12 18:28:18 -06:00
Eduardo José Tagle
ac168a03c8 Fixes for the Arduino DUE HAL (Serial Port, Graphics Display, EEPROM emulation) (#8651)
* Fixing the DUE serial port assignments: Now -1 means the SAM3x USB Device emulating a serial port, and 0 means the USB to serial adapter included as a programming port

* Improving the Fast IO port access implementation on Arduino DUE

* Implemented EEPROM emulation on Due by storing data on the internal FLASH (with wear leveling)

* Implemented a Software SPI for the ST7920 graphics display for the Arduino RAMPS for DUE, as the default one in u8glib is clocking data too fast on ARM, and the display does not understand it.

* Fixing the case where the serial port selected is the USB device

* Adding configuration for the Makerparts 3D printer (www.makerparts.net)

* Tuned MakerParts acceleration on X and Y axis so it never loses steps. Also adjusted pulses per mm to match default hw configuration

* Fine tuned Maximum acceleration for MakerParts printer

* Style cleanup

* Style cleanup (2)

* Style fixes (3)

* Fixing the DUE serial port assignments: Now -1 means the SAM3x USB Device emulating a serial port, and 0 means the USB to serial adapter included as a programming port

* Improving the Fast IO port access implementation on Arduino DUE

* Implemented EEPROM emulation on Due by storing data on the internal FLASH (with wear leveling)

* Implemented a Software SPI for the ST7920 graphics display for the Arduino RAMPS for DUE, as the default one in u8glib is clocking data too fast on ARM, and the display does not understand it.

* Fixing the case where the serial port selected is the USB device

* Adding configuration for the Makerparts 3D printer (www.makerparts.net)

* Tuned MakerParts acceleration on X and Y axis so it never loses steps. Also adjusted pulses per mm to match default hw configuration

* Fine tuned Maximum acceleration for MakerParts printer

* Style cleanup

* Style changes to u8g_dev_st7920_128_64_sw_spi.cpp

* Even more improvements to the FastIO HAL for DUE. Now WRITE() is 2 ASM instructions, if value is constant, and 5 cycles if value is not constant. Previously, it was 7..8 cycles

* After some problems and debugging, seems we need to align the interrupt vector table to 256 bytes, otherwise, the program sometimes stops working

* Moved comments out of macro, otherwise, token pasting does not properly work sometimes

* Improved Software SPI implementation on DUE: Now it honors the selected speed passed to spiInit(). This allows much faster SDCARD access, improving SDCARD menus and reducing latency

* Update u8g_dev_st7920_128_64_sw_spi.cpp

* Disabling EEPROM over FLASH emulatiion if an I2C or SPI EEPROM is present
2017-12-12 17:51:36 -06:00
victorpv
084f2434a7
Update readme.md 2017-12-11 23:14:13 -06:00
victorpv
7c7ae5ebef
Delete duplicated file. 2017-12-11 23:10:44 -06:00
victorpv
4feffca178
fix for issue #8585
As reported in this issue:
https://github.com/MarlinFirmware/Marlin/issues/8585
I have it working fine in my local copy like that change.
2017-12-11 23:07:39 -06:00
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
6149b82119 Allow setting current timer counter 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
b8bc965414 General cleanup HAL timers 2017-12-10 18:38:52 -06:00