Цитата(Понедельник @ Sep 25 2007, 17:23)

формула для вычисления SPCK Baudrate -
1. (из даташита) SPCK Baudrate = MCK/SCBR
2. (скачал с сайта OLIMEX исходники для SAM7-EX256 и вот что обнаружил)
l_pSpi->SPI_CSR[0] = 0x01010C11; //9bit, CPOL=1, ClockPhase=0, SCLK = 48Mhz/32*12
откуда в знаменателе появилась цифра 32 ?
какая формула правильная ?
In Master Mode, the SPI Interface uses a modulus counter to derive the SPCK baud rate from the SPI Master Clock(selected between MCK and MCK/32). The baud rate is selected by writing a value from 2 to 255 in the field SCBR. The following equation determines the SPCK baud rate:
SPCK_Baud_Rate = SPI_Master_Clock_frequency /SCBR
Giving SCBR a value of zero or one disables the baud rate generator. SPCK is disabled and assumes its inactive state value. No serial transfers may occur. At reset, baud rate is disabled.
AT91C_SPI_FDIV Clock Selection
0 = SPI Master Clock equals MCK
1 = SPI Master Clock equals MCK/32. Product dependancy