2009-05-22 01:56 AM
2011-05-17 02:52 AM
Seems to me the uPSD3400 data sheet gives the wrong formula for
the PCA clock when using Fosc as the source. The formula is shown as:- Fpca = Fosc / ( 2^PCAxPS[3:0] ) whereas it seems to be:- Fpca = Fosc / ( 256 * 2^PCAxPS[3:0] ) That is, a factor of 256 lower. Could ST support confirm this? I've not seen errata notes discussing this.2011-05-17 02:52 AM
OK, it's an old post, but I was just checking this, so...
The ST formula is for the clock *input* to the PCA counter. So if you are using a PWM mode, the *output* on the pin will be this divided by the counter range, which as you say is 256 if you use 8-bit mode. So I've got a 20MHz crystal, and I've got the PCA in 8-bit fixed frequency PWM mode with unity prescaler, and my PWM output reads as 78kHz, which is 20MHz divided by the 8-bit counter length, ie 256.