You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on the second exercise of lesson1 and not really clear about the order of enabling UART. Below is my order of setting different register to enable UART but this is not working to print any character.
put32(UART_CR, 0); // Disable the UART. CR is control register.put32(UART_LCRH, (1<<4)|(3<<5)); // Enable FIFO and 8bit in a frame to transmit/receiveput32(UART_IBRD, 26); // Set the Integer baud rate divisor put32(UART_FBRD, 3); // Set the Fraction baud rate divisor registerput32(UART_CR, (1 | 1<<8 | 1<<9)); // enable UART and enable UART's Transmit and Receive
Then I try to check the reference solution and all guys did like the following order:
put32(UART_IBRD, 26); // Set the baud rate divisor registerput32(UART_FBRD, 3);
put32(UART_LCRH, (1<<4)|(3<<5)); // Enable FIFO and 8bit in a frame to transmit/receive
You will set the baud rate divisor register(IBRD & FBRD) first and then LCRT register (the line control register).
I checkout the BCM2837 ARM Peripherals manual but I can not find any section talking about the order of setting these register. Can anyone share about why the order of enabling
UART register is like this or any background knowledge to this order? Thank you.
The text was updated successfully, but these errors were encountered:
I am working on the second exercise of lesson1 and not really clear about the order of enabling UART. Below is my order of setting different register to enable UART but this is not working to print any character.
Then I try to check the reference solution and all guys did like the following order:
You will set the baud rate divisor register(IBRD & FBRD) first and then LCRT register (the line control register).
I checkout the BCM2837 ARM Peripherals manual but I can not find any section talking about the order of setting these register. Can anyone share about why the order of enabling
UART register is like this or any background knowledge to this order? Thank you.
The text was updated successfully, but these errors were encountered: