I was thinking today (and no I didn’t hurt myself), would it be possible to determine the frequency of a pulse train (pwm) via the SPI bus. The idea is to connect the PWM to the MISO pin and do a short read of around 1kilo byte of data. that would equal 8K clock cycles. Then we would look for values that are greater than zero to determine when the pulse starts. We then subtract that index from the index where the values fall to zero and then back. After that we count all the bits between them and divide the clock frequency by that number. This answer should tell us approximately the frequency of the pulse train.
Does anyone see a problem with this approach?
Also, when a Fez (any type) is sending and receiving data via the SPI bus is the processor involved in that transfer process or is it handled by some sort of subsystem?