Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] STM32 Timer PWM with DMA

Status
Not open for further replies.

Sudhakar R

Newbie level 6
Joined
Dec 26, 2022
Messages
12
Helped
0
Reputation
0
Reaction score
2
Trophy points
3
Activity points
121
I'm using Timer_2 channel_1 PWM with DMA to generate the low polarity Pulse.
I set the value of PSC = 72, ARR = 2000 and Fosc = 72 MHz.

uint16_t TIM2_CCR1_Value[25] = {2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100, 1200, 1500, 1500, 1500, 1500, 500, 1500, 1500, 1500, 1500, 500, 500, 1500, 1500, 1500, 1500, 500};
above I given TIM2_CCR1 array values,
Free bit {2100, 2100, 2100, 2100, 2100, 2100, 2100, 2100} = {0, 0, 0, 0, 0, 0, 0, 0}.
Start bit 1200 mean 1.2ms off and 0.8ms on.
Data_0 {1500, 1500, 1500, 1500, 500, 1500, 1500, 1500} = {0, 0, 0, 0, 1, 0, 0, 0}.
Data_1 {1500, 500, 500, 1500, 1500, 1500, 1500, 500} = {0, 1, 1, 0, 0, 0, 0, 1}.
below I given the TIM2_CCR1 array values WaveForm,

1678875966237.png


here, Free bit and Start bit timing is 20.0155 ms. Data_0 and Data_1 totally 16 bit but i get only 15 bit. after that i found that missing first bit data(value is 0).
I don't know where I made a mistake if any know help me and solve this.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top