My new related question is about a function I need to implement, but I can't figure out how to do it cleanly and possibly totally in hardware.
I have a periodic square signal generated by my application.
I need to generate a new periodic square signal that is 8 time more fast and that perfectly sync with the signal above, every it's rise edge.

In the Reference Manual I saw this block diagram:

However, going into more detail about the behavior of PWM_EXT_SYNC I found this block diagram:

It seems that the PWM peripheral is unable to simultaneously generate the PWM signal and synchronize with the external signal, is this true?
Can you help me to find a good solution for my needs?
Thank you very much,
Silvio