Comments (4)
the chibios systick uses timer 2 unfortunately. timer 2 and timer 5 are the only 32 bit timers in the stm32f4 fit for chibios.
#define STM32_ST_USE_TIMER 2
(in mcuconf.h)
Timers 1 and 8 are used for motor pwm generation and adc control.
Timers 3 and 4 are supported because they are the 2 timers historically available on extra io pins for most hardwares. Either on the hall sensor port or the servo port. also they support dma which i think is required?
I do not believe that timer 5 is being used for anything if one of it's gpio's is accessible. but it needs to be enabled.
timer 13 (PA6) or 14 (PA7) may be able to be used as well, though they may not be able to access DMA? which i think is required for ws2812 control.
Basically, the hardware timers are tightly integrated with the way vesc works and playing around with them without being careful and understanding the larger system can quickly break things.
what reason do you want to use a different timer?
from bldc.
Appreciate your quick response.
Basically I have a hardware design where I am utilizing almost all of the available pins including timer3 and timer4. PB3/ Timer2 is the only remaining pin which I could use for the LEDs as I also noted it has DMA access.
If you say that timer5 could potentially be used for ChibiOS control, would it be a matter of simply swapping 2 to 5 in the below to free up timer 2 for the leds?:
#define STM32_ST_USE_TIMER 5
Thanks again for your help.
from bldc.
I think that would work. Both timer 2 and 5 are 32 bit so that should be the only change needed. Try it and see if it works.
Worst case the compiler yells at you or it doesn't boot.
Then getting the led package to work is the other thing.
from bldc.
Thanks Ill give this a try ! Yeah the other part should not be too difficult.
from bldc.
Related Issues (20)
- Flipsky hardware firmware naming inconsistency HOT 2
- Feature request: Lisp ADC detach more modes/ improvement HOT 2
- can-cmd: not limiting motor speed HOT 7
- COMM_SET_MCCONF not receiving acknowledge reply and does not set any values
- Feature Discussion: Strong-Typed Packet ID HOT 2
- Speed ramp on the FOC current controll
- Error updating firmware from Unity 23.46 to VESC 6.02 HOT 1
- Lisp eval_error after update to VESC 6.05 Beta 8 HOT 1
- No timeout on ADC override in Lisp HOT 4
- Motor start speed option for accelerator ADC input
- FOC Speed Control with Quadrature Encoder (ABI Encoder) HOT 1
- New proposed feature: write-locking via 4-digit PIN HOT 2
- Usage of sin/cos encoders/inputs, recommendation for hookup table?
- Blocking behaviour of code in tight loops
- Redundant copy of buffer HOT 2
- Add command to set target speed and max current - needed for EScooters HOT 10
- No way to use the serial port when the motor is running HOT 3
- Feature Request: add ADC1 option to Kill Switch Mode, implement internal pull-up/down resistors
- Mixed up config for FAULT_CODE_ABS_OVER_CURRENT HOT 2
- Feature request: Implement hardware-based "safe mode" limits via hardware pin HOT 1
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 bldc.