2025-07-02 7:33 PM
Hi,
I am using the STM32F407VET6 chip to simulate the SENT protocol. I have encountered some issues and would appreciate it if professionals in the forum could provide some answers.
1.Since the SENT protocol signal needs to change the output waveform based on the transmitted data, I attempted to use the TIM BURST feature of the chip to simulate the SENT signal. I am configuring it using STM32CubeMX software. Below are the relevant configurations:
2.The SENT protocol specifies that one tick is 3μs to 10μs. I initially set the PWM to a period of 3μs with a 50% duty cycle square wave and output it. Since I am not very familiar with the TIM BURST feature, I first used the HAL_TIM_DMABurst_WriteStart() function to attempt to modify the waveform originally output by the chip. I plan to change the waveform to the synchronization signal in the SENT protocol, which involves outputting 5 ticks of low-level signal and 51 ticks of high-level signal.
Initial PWM output waveform:
The desired SENT waveform:
Specifications related to the SENT protocol:
3.Source code of the program:
4.The problem I'm facing now:
(1)The program code I wrote is not able to change the waveform. I’m not sure if there’s an issue with my initialization or if there’s a problem with the usage of the HAL_TIM_DMABurst_WriteStart function.
(2)I have a question about the HAL_TIM_DMABurst_WriteStart function. Since I want to modify the values of the ARR, RCR, and CCR1 registers, I'm not sure if modifying the ARR register value has any relation to the value set during the initialization configuration.
I hope the relevant persons can answer my questions,thanks.