cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L432kc

Cmatt.11
Associate II

Hi guys

I'm using the nucleo STM32L432kc

For the purpose of measuring fluide conductivity i need the following actions.

- Generate a PWM1 signal with a frequency between (100Hz_ 10KHz) with a fixed duty cycle of 50%

- 2 DAC signals DAC1= 1,5V+ Vext

DAC2= 1,5V -Vext

with 20mV <Vext < 100mV

- for the acquisition a 3 inputs ADC Have to measure the The voltages from the externel circuitry outputs every last third of the half PWM cycle by doing the 3 channels scan .

The approach I'm using is I'm using an other INVERTED PWM2 signal with the half of the PWM1 period and 64% duty cycle to trigger the ADC acquisition.

Can someone help me with the configuration or propose and other idea ?

3 REPLIES 3

Thinking you could do with ONE TIM, the square wave in toggle mode, and 3x PWM with the remaining channels.

Remember PSC/ARR values are written in an N-1 form ie divide by 4 [0, 1, 2, 3] is written as a 3

You'd need to look at the ADC resources, and the TIM vs ADC triggers.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

but with same timer i could only have different duty cycles and the frequency remains the same

Does T have different values for the upper/lower traces in your diagram?

If they are unrelated I clearly misunderstood.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..