Search found 8 matches
- Tue Mar 12, 2024 4:23 pm
- Forum: Hardware
- Topic: ESP32 MCPWM Capture Channel current counter running value
- Replies: 0
- Views: 563
ESP32 MCPWM Capture Channel current counter running value
Hi Given the documentation I can see than inside the register PWM_CAP_CHx_REG is stored the timestamp of the last capture event I would like to know how I can access the current value of the running counter to compare the stored value of PWM_CAP_CHx_REG so to calculate the elapsed time from the last...
- Tue Mar 12, 2024 3:55 pm
- Forum: Hardware
- Topic: MCPWM Update MCPWM_TIMERx_PRESCALE and MCPWM_TIMERx_PERIOD
- Replies: 2
- Views: 1604
Re: MCPWM Update MCPWM_TIMERx_PRESCALE and MCPWM_TIMERx_PERIOD
New timer pre-scale value will take effect when the timer goes from STOP to START. So there is no way to have it updated on TEZ? So in this case it get updated: PWM_TIMERx_CFG1_REG.PWM_TIMERx_START = [0, 1, 3, 4] Timer stop at Zero or Period (or was already stopped) PWM_TIMERx_CFG1_REG.PWM_TIMERx_S...
- Sat Feb 10, 2024 9:04 pm
- Forum: Hardware
- Topic: MCPWM Update MCPWM_TIMERx_PRESCALE and MCPWM_TIMERx_PERIOD
- Replies: 2
- Views: 1604
MCPWM Update MCPWM_TIMERx_PRESCALE and MCPWM_TIMERx_PERIOD
Hi I would like to know when MCPWM_TIMERx_ PRESCALE is updated The documentation describe how I can control the update of MCPWM_TIMERx_ PERIOD configuring register MCPWM_TIMERx_ PERIOD_UPMETHOD (I'm using TEZ rn) but not what happen to MCPWM_TIMERx_ PRESCALE I would like to know when a write to MCPW...
- Wed Mar 15, 2023 11:56 am
- Forum: General Discussion
- Topic: MCPWM change TIMERn Prescaler
- Replies: 3
- Views: 3788
Re: MCPWM change TIMERn Prescaler
Hi @rudi and thanks for the answer Yes I'm inded trying this on the esp32-s3 Thank for the suggestion, but as I said: On the struct definition https://github.com/espressif/esp-idf/blob/94c87a91060ff6e5962ec19e7152fc402e6c704c/components/soc/esp32s3/include/soc/mcpwm_struct.h#L35-L39C36 it is written...
- Wed Mar 01, 2023 9:03 pm
- Forum: General Discussion
- Topic: MCPWM change TIMERn Prescaler
- Replies: 3
- Views: 3788
MCPWM change TIMERn Prescaler
Hi I'm developing a motion controller using ESP32-S3 (follow-up of https://esp32.com/viewtopic.php?f=13&t=30817 , that suggestion worked perfectly, thanks) I want to change at runtime the prescaler of a timer ( while keeping the group scaler the same ) On the struct definition https://github.com/esp...
- Wed Nov 30, 2022 9:20 am
- Forum: ESP-IDF
- Topic: Using same pin as MCPWM output and PCNT input on ESP32-S3
- Replies: 5
- Views: 3539
Re: Using same pin as MCPWM output and PCNT input on ESP32-S3
Thanks @EPS_morris for the heads up I wrote our custom quintic realtime position stream follower motion controller, it control the motor by velocity, but the step interface of the driver accept only step pulses Right now I have a core running a busy-loop for generating the steps at the correct speed...
- Mon Nov 28, 2022 7:38 pm
- Forum: ESP-IDF
- Topic: Using same pin as MCPWM output and PCNT input on ESP32-S3
- Replies: 5
- Views: 3539
Re: Using same pin as MCPWM output and PCNT input on ESP32-S3
Hi Thank you for the fast response So I need to configure everything and then: set pin in mode PIN_FUNC_GPIO set direction as GPIO_MODE_INPUT_OUTPUT GpioConnectInput to PNCT GpioConnectOutPut to MCPWM By now (still in testing phase) I configured all of MCPWM using actual register, something like: SE...
- Mon Nov 28, 2022 12:07 pm
- Forum: ESP-IDF
- Topic: Using same pin as MCPWM output and PCNT input on ESP32-S3
- Replies: 5
- Views: 3539
Using same pin as MCPWM output and PCNT input on ESP32-S3
Hi We are developing a custom PCB where we have to control 4 TMC2209 (with STEP and DIR signals) For our applications we want to use MCPWM for generating the PULSE and DIR signals (se are already able to do that setting internal register as specified in the technical reference manual) We are using t...