Commit Graph

139 Commits

Author SHA1 Message Date
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
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
Scott Lahteine
de3d3b9cb1 Put FORCE_INLINE before static 2017-12-08 00:46:22 -06:00
Scott Lahteine
a3b098b4be Whitespace clean 2017-12-06 14:02:44 -06:00
Bob-the-Kuhn
57fac33a74 add explanations
1) add explanations as to why software SPIs are selected

2) remove unused flag/option
2017-12-03 20:32:22 -06:00
Bob-the-Kuhn
bb23286383 add README & modify spi_pins.h
still trying to fix file name
2017-12-03 20:00:56 -06:00
Bob-the-Kuhn
fb44f8e50f
Merge pull request #8616 from hg42/bugfix-2.0.x
[2.0.x][LPC1768][FIX] NUM_DIGITAL_PINS was negative, fixes PWM, arduino io functions, M42, M43, M226, probably also Servo, some LCD, soft spi, SoftwareSerial, ... may be others
2017-12-03 14:48:00 -06:00
Bob-the-Kuhn
4c5356f77a
Merge pull request #8622 from hg42/implement-LPC1768-GET_TIMER
[2.0.x][LPC1768][fix] Implement GET_TIMER and other GET_xxx, fixes PWM
2017-12-03 14:46:22 -06:00
Harald Gutsche
f5b4e1ef4f as a workaround enable PWM for any pin, see PR #8622 2017-12-03 20:37:02 +01:00
Unknown
4c5ffd2349 [2.0.x] Report SERIAL_XON_XOFF in M115
-Report SERIAL_XON_XOFF in Extended Capabilites M115 report for hosts
-Remove outdated 256 size limitation from comments on RX_BUFFER_SIZE defines
-Update error message conditions
2017-12-02 21:08:06 -08:00
Unknown
d1f11e9c10 fix missing GET_TIMER (used by PWM for Ex_AUTO_FAN) 2017-12-01 22:28:55 +01:00
Harald Gutsche
dd1b503f64 fix NUM_DIGITAL_PINS being negative for more than 127 digital pins 2017-12-01 07:39:46 +01:00
Scott Lahteine
c8718aa111 Spacing, macros in LPC1768_PWM 2017-11-26 20:20:05 -06:00
Bob-the-Kuhn
7d8b66e207
Merge pull request #8570 from Bob-the-Kuhn/Sbase-PWM
[2.0.x] MKS Sbase - add servo pin definitions and add directly controlled PWM
2017-11-26 09:36:18 -06:00
Bob-the-Kuhn
59b32c25b5 MKS Sbase changes 2017-11-26 07:47:06 -06:00
Thomas Moore
7bb1721f35 Fix _BV already defined warnings for Teensy 2017-11-24 22:34:39 -06:00
Thomas Moore
5f9592a523 Cleanup narrowing warning in pin_is_protected 2017-11-24 22:15:56 -06:00
Thomas Moore
34eaaab5fb Fix _BV already defined warnings 2017-11-24 21:59:31 -06:00
Thomas Moore
fa577392b2 Add BIQU BQ111-A4 board 2017-11-22 16:34:59 -06:00
Scott Lahteine
c2fc78c3a8 #ifndef => #if !PIN_EXISTS 2017-11-22 16:28:52 -06:00
Scott Lahteine
c613a1ed38 Fix indentation, stepper.h dependency, etc. 2017-11-22 14:55:30 -06:00
teemuatlut
f011a32771 Board definitions for Ultratronics Pro v1.0 2017-11-22 14:55:24 -06:00
Bob-the-Kuhn
9dad534f02 fixed 2017-11-21 21:37:20 -06:00
Scott Lahteine
3066655727 Try port*100+pin, fix config dependency 2017-11-20 13:58:23 -06:00
Scott Lahteine
ba8bc7ea80 Cosmetic tweaks 2017-11-20 13:58:02 -06:00
Scott Lahteine
f409147116 Fix P2_04, P2_05 2017-11-20 13:58:02 -06:00
Bob-the-Kuhn
a28ccabe2a M42 P1.20 fix 2017-11-20 13:58:02 -06:00
Scott Lahteine
b9327a4d16 Misc. general cleanup 2017-11-19 15:43:39 -06:00
Scott Lahteine
8836623e0f Fix sq/min/max macros after platform headers 2017-11-19 15:43:39 -06:00
Scott Lahteine
fe4f009fdd 32-bit unless… 2017-11-19 15:43:38 -06:00
Scott Lahteine
1d4571b88d Dependency adjustments 2017-11-19 15:43:38 -06:00