Determine the values of PSC, CCR, and ARR registers to generate the signal below if timer clock is 80 MHz:

T = 100 us
w = 70 us

psc: 79

To determine the values of the PSC, CCR, and ARR registers, we need to first calculate the period (T) and pulse width (w) in terms of timer clock cycles:

1. Calculate the period (T) in timer clock cycles:
T = 100 us = 0.0001 s
Timer Clock = 80 MHz = 80,000,000 Hz
Period (T) = T * Timer Clock = 0.0001 s * 80,000,000 Hz = 8,000 timer clock cycles

2. Calculate the pulse width (w) in timer clock cycles:
w = 70 us = 0.00007 s
Pulse Width (w) = w * Timer Clock = 0.00007 s * 80,000,000 Hz = 5,600 timer clock cycles

Now, we have:
Period (T) = 8,000 timer clock cycles
Pulse Width (w) = 5,600 timer clock cycles

Since the PSC register is 79, we can calculate the ARR and CCR registers as follows:

1. ARR (Auto-Reload Register):
ARR = (Period (T) / PSC) - 1
ARR = (8,000 / 79) - 1
ARR = 101 - 1
ARR = 100

2. CCR (Capture/Compare Register):
CCR = ARR - Pulse Width (w)
CCR = 100 - 5,600
CCR = -5,500 (this register value is not valid, so we need to adjust the PSC value)

Based on the given values for T and w, it seems that the PSC value of 79 is too high and causing the CCR value to be negative. We can try adjusting the PSC value to a lower value (e.g., 39) and recalculate the ARR and CCR registers:

New PSC = 39

1. ARR (Auto-Reload Register) with PSC = 39:
ARR = (8,000 / 39) - 1
ARR = 205 - 1
ARR = 204

2. CCR (Capture/Compare Register) with PSC = 39:
CCR = ARR - Pulse Width (w)
CCR = 204 - 5,600
CCR = -5,396

With a PSC value of 39, the new ARR and CCR registers would be:
PSC = 39
ARR = 204
CCR = -5,396

Therefore, to generate the signal shown, the PSC register value should be 39, the ARR register value should be 204, and the CCR register value should be -5,396.