cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting PWM output to input on the same board

Jvan .10
Associate III

Good day everyone,

At the moment I'm trying to connect a PWM output pin to a PWM input pin on the same board. I'm using a dual core MCU, so both of them are on a different core.

I set TIM4 to the M7 and TIM15 to the M4.

0693W000008wfRGQAY.png0693W000008wfRQQAY.png0693W000008wfRaQAI.png0693W000008wfRfQAI.png 

I enabled the interrupt for TIM15 and when running this code on the M4:

IC_Val1 = HAL_TIM_ReadCapturedValue(&htim15, TIM_CHANNEL_1);

IC_Val1 stays 0 forever. Pin PB7 (TIM4_CH2) is connected to pin PE5 (TIM15_CH1) with a jumper wire.

Am I missing a setting?

2 REPLIES 2
KnarfB
Principal III

What do want to measure with TIM15? For measuring the PWM pulse length, activate internal clock with appropriate prescaler and period, keep trigger and slave modes disabled, and choose PWM on CH1 for Combined Channels.

Also assuming that you have started the timers...

hth

KnarfB

Jvan .10
Associate III

I want to measure the frequency of TIM4 with TIM15. Do you know how?