Comments (11)
Seems it is possible, from PA1 spec: USART2_RTS(9)/ADC12_IN1/TIM2_CH2(9)
driver.h must be modified for that, STEPPER_TIMER
has to be changed as well as it is mapped to timer 2.
You can do it?
from stm32f1xx.
I will try to do it. If I am not successful, I will inform you,
from stm32f1xx.
Seems it is possible, from PA1 spec:
USART2_RTS(9)/ADC12_IN1/TIM2_CH2(9)
driver.h must be modified for that,STEPPER_TIMER
has to be changed as well as it is mapped to timer 2.You can do it?
I have modified the driver.h file for SPINDLE PWM on PA1, gives output when SPINDLE_PWM_TIMER_INV set to 1, output does not work when set to 0
// Define timer allocations.
#define STEPPER_TIMER TIM5
#define PULSE_TIMER TIM3
#define DEBOUNCE_TIMER TIM4
#ifdef SPINDLE_PWM_PORT_BASE
#if SPINDLE_PWM_PORT_BASE == GPIOA_BASE
#if SPINDLE_PWM_PIN == 1 // PA1 - TIM2_CH2
#define SPINDLE_PWM_TIMER_N 2
#define SPINDLE_PWM_TIMER_CH 2
#define SPINDLE_PWM_TIMER_INV 1
#define SPINDLE_PWM_AF_REMAP 0
#endif
#if SPINDLE_PWM_PIN == 8 // PA8 - TIM1_CH1
#define SPINDLE_PWM_TIMER_N 1
#define SPINDLE_PWM_TIMER_CH 1
#define SPINDLE_PWM_TIMER_INV 0
#define SPINDLE_PWM_AF_REMAP 0
#endif
#elif SPINDLE_PWM_PORT_BASE == GPIOB_BASE
#if SPINDLE_PWM_PIN == 0 // PB0 - TIM1_CH2N
#define SPINDLE_PWM_TIMER_N 1
#define SPINDLE_PWM_TIMER_CH 2
#define SPINDLE_PWM_TIMER_INV 1
#define SPINDLE_PWM_AF_REMAP 0b01
#endif
#endif
I want normal output of this signal
from stm32f1xx.
I have modified the driver.h file for SPINDLE PWM on PA1, gives output when SPINDLE_PWM_TIMER_INV set to 1, output does not work when set to 0
That is a bit odd, is this with a cloned MCU or genuine one?
I want normal output of this signal
The scope trace does not tell me anything. What is wrong with it? Should it be 5KHz?
from stm32f1xx.
The scope trace does not tell me anything. What is wrong with it? Should it be 5KHz?
I guess I didn't fully explain the problem. The output of the oscilloscope indicates that the output of the generated signal is inverted. The expected signal should be invertesd to the signal on the oscilloscope, how should we set it up?
The generated PWM signal should be a signal for the BESC spindle as shown below appears on the oscilloscope.
from stm32f1xx.
That is a bit odd, is this with a cloned MCU or genuine one?
real mcu, i am using BTT SKR MINI E3 V2.0 3D printer board
from stm32f1xx.
$16=4
works? ($$=16
for info)
from stm32f1xx.
$16=4
works? ($$=16
for info)
$16=4 ,I did nothing changed
$$=16
0 - Spindle enable (1)
1 - Spindle direction (2)
2 - PWM (4)
Inverts the spindle on, counterclockwise and PWM signals (active low).
from stm32f1xx.
#define SPINDLE_PWM_TIMER_INV 1
when SPINDLE_PWM_TIMER_INV set to 0
#define SPINDLE_PWM_TIMER_INV 0
no pwm output on PA1
from stm32f1xx.
There is a nasty bug here, wonder if it is this that trips it up for PA1? The line should be:
SPINDLE_PWM_TIMER->CCER |= SPINDLE_PWM_CCER_EN;
from stm32f1xx.
There is a nasty bug here, wonder if it is this that trips it up for PA1? The line should be:
SPINDLE_PWM_TIMER->CCER |= SPINDLE_PWM_CCER_EN;
good catch, it works now. that is, we can use two different pins (PA1 and PA8) for the pwm spindle output on the BTT SKR MINI E3 V2.0 3D printer board. in driver.h latest revision code as below
// Define timer allocations.
#define STEPPER_TIMER TIM2
#define PULSE_TIMER TIM3
#define DEBOUNCE_TIMER TIM4
#ifdef SPINDLE_PWM_PORT_BASE
#if SPINDLE_PWM_PORT_BASE == GPIOA_BASE
#if SPINDLE_PWM_PIN == 1 // PA1 - TIM5_CH2
#define SPINDLE_PWM_TIMER_N 5
#define SPINDLE_PWM_TIMER_CH 2
#define SPINDLE_PWM_TIMER_INV 0
#define SPINDLE_PWM_AF_REMAP 0
#endif
#if SPINDLE_PWM_PIN == 8 // PA8 - TIM1_CH1
#define SPINDLE_PWM_TIMER_N 1
#define SPINDLE_PWM_TIMER_CH 1
#define SPINDLE_PWM_TIMER_INV 0
#define SPINDLE_PWM_AF_REMAP 0
#endif
#elif SPINDLE_PWM_PORT_BASE == GPIOB_BASE
#if SPINDLE_PWM_PIN == 0 // PB0 - TIM1_CH2N
#define SPINDLE_PWM_TIMER_N 1
#define SPINDLE_PWM_TIMER_CH 2
#define SPINDLE_PWM_TIMER_INV 1
#define SPINDLE_PWM_AF_REMAP 0b01
#endif
#endif
from stm32f1xx.
Related Issues (20)
- Usb not working on 103RC HOT 30
- Port restrictions for 5-axis? HOT 2
- STM32CubeIDE Build Project failed with 5 errors. HOT 2
- Creality 4.2.2 stm32f103ret6 support HOT 6
- safety door enabled but not stopping the program HOT 2
- machine suddenly stops while working HOT 2
- how to compiling stm32f103c8t6 HOT 2
- Questions about grblhal using timers for outputting pulses HOT 2
- Z probe wiring diagram for skr mini e3 v2 HOT 7
- Please, help check and suggest modifications CNC3040 map file. HOT 16
- no usb com port HOT 4
- USB is not working on stm32f103RCT6. HOT 4
- Motor Stepper buzzes using A4988 and drv 8825 HOT 4
- error:7 - A settings read failed. Auto-restoring affected settings to default values. HOT 7
- Build fails, not enough flash HOT 3
- MiniGerbil 2 board map HOT 1
- STM32F103RCT6 : bad linker file
- Y & Z TMC2209s not being properly init'ed on BTT SKR Mini E3 V2.0 HOT 5
- Can't use SWD on BTT SKR Mini E3 V2.0 HOT 4
- E-stop/alarm issue HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stm32f1xx.