cancel
Showing results for 
Search instead for 
Did you mean: 

STM-Mat/Target and Timer Input Capture Mode

Posted on March 11, 2017 at 13:24

Hello, 

I'm Steve A., student in an engeneering school in France and these days I've been trying the release of STM32-MAT/TARGET to know if I can command a brushless motor with it. It's a really powerfull tool for those who want to do some code generation projects like me.

Let's get to the bug. I've configured the TIMER1 in Input PWM (by STM32CubeMx) to measure the frequency of a PWM generated by the TIMER2. The generated code seems fine except that CCR1 register doesn't get the counter value when an event occurs (rising edge in my case).

I use the STMCubeMx project as a source file for my Simulink Model. I build the model which generate code for uVision Keil which compiles and flashes the code to mySTM32F407-Discovery.

I attached the code executed each time the interruption is up. Hope u'll find this interesting and can help me to find out what is happening wrong.

Thanks in advance for your answer.

Regards,

Steve.A.

#stm32f4-discovery #pwm-input #stm32-mat/target-matlab
0 REPLIES 0