# What is my AHB1 clock rate?

I am working with an ARM Cortex M3 chip (reference manual available here). I'm trying to get the baud rate of my USART communications right. Reading pages 613 onwards, I understand that the value I should set for USARTDIV depends on the clock rate of AHB1 (since I am working with USART3, governed by the AHB1 clock).

Looking at pages 614 onwards, I see that the clock rate f_PCLK can take many different values (8MHz, 12Mhz, etc.). However, I cannot see anywhere where I can set the speed of that clock.

How can I measure/change/read the speak of the AHB1 clock?

-

 Thanks! Do you understand what the line __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; exactly means? – Randomblue Mar 20 '12 at 16:20 It's an array that is used to set the SystemCoreClock variable. Search for both AHBPrescTable and SystemCoreClock and you should be able to figure out what's going on. – Armandas Mar 20 '12 at 16:29