AnsweredAssumed Answered

Re: ADuCM360 Peripheral Clock

Question asked by ABuda on Sep 26, 2012
Latest reply on Sep 26, 2012 by ABuda

If I configure the ADuCM360 to run at 8MHz using: ClkCfg(CLK_CD1,CLK_HF,CLKSYSDIV_DIV2EN_DIS,CLK_UDIV);

Then configure the UART clock to run at 4MHz using ClkSel(CLK_CD7,CLK_CD7,CLK_CD2,CLK_CD7);

And finally if I configure the UART with a baud rate of 9600 and enable the UART interrupts using:

UrtCfg(pADI_UART,B9600,COMLCR_WLS_8BITS,0);

UrtMod(pADI_UART,COMMCR_DTR,0);

UrtIntCfg(pADI_UART,COMIEN_ERBFI|COMIEN_ETBEI|COMIEN_ELSI|COMIEN_EDSSI|COMIEN_EDMAT|COMIEN_EDMAR);

NVIC_EnableIRQ(UART_IRQn);

(Extracted from the ADC example project),

 

The UART doesn't work. This is as expected because the peripheral clock of the UART (4MHz in this case) must be greater or at least equal to UCLK/CD bits (8MHz in this case). (According to the user guide)

 

My issue is that the UART still doesn't work after setting the cortex clock to a slower speed of 2MHz

ClkCfg(CLK_CD3,CLK_HF,CLKSYSDIV_DIV2EN_DIS,CLK_UDIV);

Outcomes