|
Hello all,
i have a AT91SAM9293-EK. I could compile, link and download the LED Test example from Atmel. The program works fine, except the debug output is not working properly:
Its initilized like this:
static void dbgu_init (void)
{
/* Reset and disable receiver */
AT91C_BASE_DBGU->DBGU_CR = AT91C_US_RSTRX | AT91C_US_RSTTX;
/* Disable interrupts */
AT91C_BASE_DBGU->DBGU_IDR = 0xFFFFFFFF;
/* Configure PIOs for DBGU */
AT91C_BASE_PIOC->PIO_ASR = AT91C_PC30_DRXD | AT91C_PC31_DTXD;
AT91C_BASE_PIOC->PIO_BSR = 0;
AT91C_BASE_PIOC->PIO_PDR = AT91C_PC30_DRXD | AT91C_PC31_DTXD;
/* === Configure serial link === */
/* Define the baud rate divisor register [BRGR = MCK / (115200 * 16)] */
AT91C_BASE_DBGU->DBGU_BRGR = 54;
/* Define the USART mode */
AT91C_BASE_DBGU->DBGU_MR = AT91C_US_CHMODE_NORMAL;
/* Disable the RX and TX PDC transfer requests */
AT91C_BASE_DBGU->DBGU_PTCR = AT91C_PDC_RXTDIS;
AT91C_BASE_DBGU->DBGU_PTCR = AT91C_PDC_TXTDIS;
/* Enable transmitter */
AT91C_BASE_DBGU->DBGU_CR = AT91C_US_TXEN;
}
... and i assume i have a 99 MHz Masterclock, so the BRGR Register should be correct with 54 (= 115200 baud)
But when i connect to a terminal i see only cryptic signs. The Terminal has 115200-8-1-N settings.
Can anyone help me, about this problem. I think there it's only a baudrate error. Is the MCK for the AT91SAM9263 really 99 MHz or is it different?
Thanks
Mario Borer
|