[LPC55xx] SYSCON->FLEXFRGXCTRL & CLOCK_GetFlexCommClkFreq

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[LPC55xx] SYSCON->FLEXFRGXCTRL & CLOCK_GetFlexCommClkFreq

857件の閲覧回数
Gorvak
Contributor II

Hmmm, it seems that my post body has disappeared upon posting and an unexpected error.

I shall try again and be more brief in case it timed out.

SYSCON->FLEXFRGXCTRL[0] = SYSCON_FLEXFRG0CTRL_MULT(18) | SYSCON_FLEXFRG0CTRL_DIV(255);

SYSCON clock is 12Mhz (FRO12Mhz), I expect the above to give me 18/256 divisor, so 1.0703125, or 12.84375Mhz, is the correct?

If I call CLOCK_GetFlexCommClkFreq(0) I get 631578, why is this? This does not seem correct.

If I don't configure FLEXFRGXCTRL (use default values), I get 12000000, which is the expected value.

If I setup FC0 as USART, and set USART0->BRG to 12 then I can communicate happily at 57600 which suggests that my maths is correct? (although I might be off by 1 somewhere?)

 

 

ラベル(1)
0 件の賞賛
返信
0 返答(返信)