Bump UART to 230400 Baud

pull/41/head
Andre Richter 4 years ago
parent bb78c779ca
commit 840c72d11b
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -64,7 +64,7 @@ init_uart_clock=48000000
6. Run `screen` (you might need to install it first):
```console
sudo screen /dev/ttyUSB0 115200
sudo screen /dev/ttyUSB0 230400
```
7. Hit <kbd>Enter</kbd> to kick off the kernel boot process. Observe the output:
@ -439,15 +439,15 @@ diff -uNr 05_safe_globals/src/bsp/driver/bcm/bcm2xxx_pl011_uart.rs 06_drivers_gp
+
+ /// Set up baud rate and characteristics.
+ ///
+ /// Results in 8N1 and 115200 baud (if the clk has been previously set to 4 MHz by the
+ /// Results in 8N1 and 230400 baud (if the clk has been previously set to 48 MHz by the
+ /// firmware).
+ pub fn init(&self) {
+ // Turn it off temporarily.
+ self.CR.set(0);
+
+ self.ICR.write(ICR::ALL::CLEAR);
+ self.IBRD.write(IBRD::IBRD.val(26)); // Results in 115200 baud for UART Clk of 48 MHz.
+ self.FBRD.write(FBRD::FBRD.val(3));
+ self.IBRD.write(IBRD::IBRD.val(13));
+ self.FBRD.write(FBRD::FBRD.val(2));
+ self.LCRH
+ .write(LCRH::WLEN::EightBit + LCRH::FEN::FifosEnabled); // 8N1 + Fifo on
+ self.CR

Binary file not shown.

Binary file not shown.

@ -162,15 +162,15 @@ impl PL011UartInner {
/// Set up baud rate and characteristics.
///
/// Results in 8N1 and 115200 baud (if the clk has been previously set to 4 MHz by the
/// Results in 8N1 and 230400 baud (if the clk has been previously set to 48 MHz by the
/// firmware).
pub fn init(&self) {
// Turn it off temporarily.
self.CR.set(0);
self.ICR.write(ICR::ALL::CLEAR);
self.IBRD.write(IBRD::IBRD.val(26)); // Results in 115200 baud for UART Clk of 48 MHz.
self.FBRD.write(FBRD::FBRD.val(3));
self.IBRD.write(IBRD::IBRD.val(13));
self.FBRD.write(FBRD::FBRD.val(2));
self.LCRH
.write(LCRH::WLEN::EightBit + LCRH::FEN::FifosEnabled); // 8N1 + Fifo on
self.CR

Binary file not shown.

Binary file not shown.

@ -162,15 +162,15 @@ impl PL011UartInner {
/// Set up baud rate and characteristics.
///
/// Results in 8N1 and 115200 baud (if the clk has been previously set to 4 MHz by the
/// Results in 8N1 and 230400 baud (if the clk has been previously set to 48 MHz by the
/// firmware).
pub fn init(&self) {
// Turn it off temporarily.
self.CR.set(0);
self.ICR.write(ICR::ALL::CLEAR);
self.IBRD.write(IBRD::IBRD.val(26)); // Results in 115200 baud for UART Clk of 48 MHz.
self.FBRD.write(FBRD::FBRD.val(3));
self.IBRD.write(IBRD::IBRD.val(13));
self.FBRD.write(FBRD::FBRD.val(2));
self.LCRH
.write(LCRH::WLEN::EightBit + LCRH::FEN::FifosEnabled); // 8N1 + Fifo on
self.CR

@ -26,15 +26,15 @@ Minipush 1.0
[MP] ⏩ Pushing 13152 KiB ======================================🦀 100% 0 KiB/s Time: 00:00:00
[ML] Loaded! Executing the payload now
[ 1.169048] Booting on: Raspberry Pi 3
[ 1.171247] Architectural timer resolution: 52 ns
[ 1.175849] Drivers loaded:
[ 1.178540] 1. GPIO
[ 1.181058] 2. PL011Uart
[W 1.184011] Spin duration smaller than architecturally supported, skipping
[ 1.190783] Spinning for 1 second
[ 2.193996] Spinning for 1 second
[ 3.195732] Spinning for 1 second
[ 0.585762] Booting on: Raspberry Pi 3
[ 0.586849] Architectural timer resolution: 52 ns
[ 0.589152] Drivers loaded:
[ 0.590498] 1. GPIO
[ 0.591758] 2. PL011Uart
[W 0.593235] Spin duration smaller than architecturally supported, skipping
[ 0.596623] Spinning for 1 second
[ 1.598232] Spinning for 1 second
[ 2.599104] Spinning for 1 second
```
## Diff to previous

Binary file not shown.

Binary file not shown.

@ -162,15 +162,15 @@ impl PL011UartInner {
/// Set up baud rate and characteristics.
///
/// Results in 8N1 and 115200 baud (if the clk has been previously set to 4 MHz by the
/// Results in 8N1 and 230400 baud (if the clk has been previously set to 48 MHz by the
/// firmware).
pub fn init(&self) {
// Turn it off temporarily.
self.CR.set(0);
self.ICR.write(ICR::ALL::CLEAR);
self.IBRD.write(IBRD::IBRD.val(26)); // Results in 115200 baud for UART Clk of 48 MHz.
self.FBRD.write(FBRD::FBRD.val(3));
self.IBRD.write(IBRD::IBRD.val(13));
self.FBRD.write(FBRD::FBRD.val(2));
self.LCRH
.write(LCRH::WLEN::EightBit + LCRH::FEN::FifosEnabled); // 8N1 + Fifo on
self.CR

@ -164,10 +164,10 @@ Minipush 1.0
Raspberry Pi 3
[ML] Requesting binary
[MP] ⏩ Pushing 8248 KiB =======================================🦀 100% 0 KiB/s Time: 00:00:00
[MP] ⏩ Pushing 8232 KiB =======================================🦀 100% 0 KiB/s Time: 00:00:00
[ML] Loaded! Executing the payload now
[ 0.742123] Parking CPU core. Please connect over JTAG now.
[ 0.372110] Parking CPU core. Please connect over JTAG now.
```
It is important to keep the USB serial connected and the terminal with the `jtagboot` open and

Binary file not shown.

Binary file not shown.

@ -162,15 +162,15 @@ impl PL011UartInner {
/// Set up baud rate and characteristics.
///
/// Results in 8N1 and 115200 baud (if the clk has been previously set to 4 MHz by the
/// Results in 8N1 and 230400 baud (if the clk has been previously set to 48 MHz by the
/// firmware).
pub fn init(&self) {
// Turn it off temporarily.
self.CR.set(0);
self.ICR.write(ICR::ALL::CLEAR);
self.IBRD.write(IBRD::IBRD.val(26)); // Results in 115200 baud for UART Clk of 48 MHz.
self.FBRD.write(FBRD::FBRD.val(3));
self.IBRD.write(IBRD::IBRD.val(13));
self.FBRD.write(FBRD::FBRD.val(2));
self.LCRH
.write(LCRH::WLEN::EightBit + LCRH::FEN::FifosEnabled); // 8N1 + Fifo on
self.CR

@ -202,22 +202,23 @@ Minipush 1.0
Raspberry Pi 3
[ML] Requesting binary
[MP] ⏩ Pushing 15840 KiB ======================================🦀 100% 0 KiB/s Time: 00:00:00
[MP] ⏩ Pushing 15824 KiB ======================================🦀 100% 0 KiB/s Time: 00:00:00
[ML] Loaded! Executing the payload now
[ 1.402763] Booting on: Raspberry Pi 3
[ 1.404961] Current privilege level: EL1
[ 1.408781] Exception handling state:
[ 1.412341] Debug: Masked
[ 1.415466] SError: Masked
[ 1.418592] IRQ: Masked
[ 1.421717] FIQ: Masked
[ 1.424844] Architectural timer resolution: 52 ns
[ 1.429445] Drivers loaded:
[ 1.432136] 1. GPIO
[ 1.434654] 2. PL011Uart
[ 1.437606] Timer test, spinning for 1 second
[ 2.441862] Echoing input now
[ 0.702482] Booting on: Raspberry Pi 3
[ 0.703570] Current privilege level: EL1
[ 0.705481] Exception handling state:
[ 0.707262] Debug: Masked
[ 0.708826] SError: Masked
[ 0.710389] IRQ: Masked
[ 0.711953] FIQ: Masked
[ 0.713518] Architectural timer resolution: 52 ns
[ 0.715819] Drivers loaded:
[ 0.717166] 1. GPIO
[ 0.718425] 2. PL011Uart
[ 0.719902] Timer test, spinning for 1 second
[ 1.722032] Echoing input now
```
## Diff to previous

Binary file not shown.

Binary file not shown.

@ -162,15 +162,15 @@ impl PL011UartInner {
/// Set up baud rate and characteristics.
///
/// Results in 8N1 and 115200 baud (if the clk has been previously set to 4 MHz by the
/// Results in 8N1 and 230400 baud (if the clk has been previously set to 48 MHz by the
/// firmware).
pub fn init(&self) {
// Turn it off temporarily.
self.CR.set(0);
self.ICR.write(ICR::ALL::CLEAR);
self.IBRD.write(IBRD::IBRD.val(26)); // Results in 115200 baud for UART Clk of 48 MHz.
self.FBRD.write(FBRD::FBRD.val(3));
self.IBRD.write(IBRD::IBRD.val(13));
self.FBRD.write(FBRD::FBRD.val(2));
self.LCRH
.write(LCRH::WLEN::EightBit + LCRH::FEN::FifosEnabled); // 8N1 + Fifo on
self.CR

@ -256,27 +256,28 @@ Minipush 1.0
Raspberry Pi 3
[ML] Requesting binary
[MP] ⏩ Pushing 65568 KiB =====================================🦀 100% 12 KiB/s Time: 00:00:05
[MP] ⏩ Pushing 65568 KiB =====================================🦀 100% 32 KiB/s Time: 00:00:02
[ML] Loaded! Executing the payload now
[ 5.793345] Booting on: Raspberry Pi 3
[ 5.795510] MMU online. Special regions:
[ 5.799330] 0x00080000 - 0x0008ffff | 64 KiB | C RO PX | Kernel code and RO data
[ 5.807491] 0x1fff0000 - 0x1fffffff | 64 KiB | Dev RW PXN | Remapped Device MMIO
[ 5.815392] 0x3f000000 - 0x3fffffff | 16 MiB | Dev RW PXN | Device MMIO
[ 5.822512] Current privilege level: EL1
[ 5.826332] Exception handling state:
[ 5.829892] Debug: Masked
[ 5.833018] SError: Masked
[ 5.836143] IRQ: Masked
[ 5.839269] FIQ: Masked
[ 5.842395] Architectural timer resolution: 52 ns
[ 5.846996] Drivers loaded:
[ 5.849688] 1. GPIO
[ 5.852206] 2. PL011Uart
[ 5.855158] Timer test, spinning for 1 second
[ 2.932547] Booting on: Raspberry Pi 3
[ 2.933631] MMU online. Special regions:
[ 2.935543] 0x00080000 - 0x0008ffff | 64 KiB | C RO PX | Kernel code and RO data
[ 2.939626] 0x1fff0000 - 0x1fffffff | 64 KiB | Dev RW PXN | Remapped Device MMIO
[ 2.943579] 0x3f000000 - 0x3fffffff | 16 MiB | Dev RW PXN | Device MMIO
[ 2.947141] Current privilege level: EL1
[ 2.949052] Exception handling state:
[ 2.950833] Debug: Masked
[ 2.952397] SError: Masked
[ 2.953960] IRQ: Masked
[ 2.955524] FIQ: Masked
[ 2.957088] Architectural timer resolution: 52 ns
[ 2.959390] Drivers loaded:
[ 2.960737] 1. GPIO
[ 2.961996] 2. PL011Uart
[ 2.963473] Timer test, spinning for 1 second
[ !!! ] Writing through the remapped UART at 0x1FFF_1000
[ 6.863485] Echoing input now
[ 3.967641] Echoing input now
```
## Diff to previous

Binary file not shown.

Binary file not shown.

@ -162,15 +162,15 @@ impl PL011UartInner {
/// Set up baud rate and characteristics.
///
/// Results in 8N1 and 115200 baud (if the clk has been previously set to 4 MHz by the
/// Results in 8N1 and 230400 baud (if the clk has been previously set to 48 MHz by the
/// firmware).
pub fn init(&self) {
// Turn it off temporarily.
self.CR.set(0);
self.ICR.write(ICR::ALL::CLEAR);
self.IBRD.write(IBRD::IBRD.val(26)); // Results in 115200 baud for UART Clk of 48 MHz.
self.FBRD.write(FBRD::FBRD.val(3));
self.IBRD.write(IBRD::IBRD.val(13));
self.FBRD.write(FBRD::FBRD.val(2));
self.LCRH
.write(LCRH::WLEN::EightBit + LCRH::FEN::FifosEnabled); // 8N1 + Fifo on
self.CR

@ -405,32 +405,32 @@ Minipush 1.0
Raspberry Pi 3
[ML] Requesting binary
[MP] ⏩ Pushing 65568 KiB =====================================🦀 100% 12 KiB/s Time: 00:00:05
[MP] ⏩ Pushing 65568 KiB =====================================🦀 100% 32 KiB/s Time: 00:00:02
[ML] Loaded! Executing the payload now
[ 5.779137] Booting on: Raspberry Pi 3
[ 5.781302] MMU online. Special regions:
[ 5.785123] 0x00080000 - 0x0008ffff | 64 KiB | C RO PX | Kernel code and RO data
[ 5.793284] 0x3f000000 - 0x3fffffff | 16 MiB | Dev RW PXN | Device MMIO
[ 5.800404] Current privilege level: EL1
[ 5.804224] Exception handling state:
[ 5.807783] Debug: Masked
[ 5.810909] SError: Masked
[ 5.814035] IRQ: Masked
[ 5.817160] FIQ: Masked
[ 5.820286] Architectural timer resolution: 52 ns
[ 5.824888] Drivers loaded:
[ 5.827579] 1. GPIO
[ 5.830097] 2. PL011Uart
[ 5.833049] Timer test, spinning for 1 second
[ 6.837304]
[ 6.837308] Trying to write to address 8 GiB...
[ 6.841638] ************************************************
[ 6.847194] Whoa! We recovered from a synchronous exception!
[ 6.852751] ************************************************
[ 6.858308]
[ 6.859697] Let's try again
[ 6.862388] Trying to write to address 9 GiB...
[ 2.913260] Booting on: Raspberry Pi 3
[ 2.914344] MMU online. Special regions:
[ 2.916256] 0x00080000 - 0x0008ffff | 64 KiB | C RO PX | Kernel code and RO data
[ 2.920338] 0x3f000000 - 0x3fffffff | 16 MiB | Dev RW PXN | Device MMIO
[ 2.923901] Current privilege level: EL1
[ 2.925812] Exception handling state:
[ 2.927593] Debug: Masked
[ 2.929156] SError: Masked
[ 2.930720] IRQ: Masked
[ 2.932284] FIQ: Masked
[ 2.933848] Architectural timer resolution: 52 ns
[ 2.936150] Drivers loaded:
[ 2.937496] 1. GPIO
[ 2.938756] 2. PL011Uart
[ 2.940233] Timer test, spinning for 1 second
[ 3.942362]
[ 3.942366] Trying to write to address 8 GiB...
[ 3.944531] ************************************************
[ 3.947310] Whoa! We recovered from a synchronous exception!
[ 3.950091] ************************************************
[ 3.952870]
[ 3.953566] Let's try again
[ 3.954912] Trying to write to address 9 GiB...
Kernel panic:
@ -455,20 +455,20 @@ SPSR_EL1: 0x600003c5
General purpose register:
x0 : 0x0000000000000000 x1 : 0x000000000008594e
x2 : 0x0000000000000026 x3 : 0x0000000000082b3c
x2 : 0x0000000000000026 x3 : 0x0000000000082b38
x4 : 0x000000000007fc5c x5 : 0x0000000000000003
x6 : 0x0000000000000000 x7 : 0x3f91980500000000
x6 : 0x0000000000000000 x7 : 0xd3d1c80822850243
x8 : 0x0000000240000000 x9 : 0x000000000008594e
x10: 0x0000000000000414 x11: 0x000000003f201000
x12: 0x0000000000000019 x13: 0x000000000007fc5d
x14: 0x000000000007fda8 x15: 0x0000000000000040
x16: 0x0000000000000000 x17: 0x0000000000000040
x18: 0x9e077028302d0802 x19: 0x0000000000090008
x18: 0x9cc47880812f1200 x19: 0x0000000000090008
x20: 0x000000003b9aca00 x21: 0x00000000000003e8
x22: 0x0000000000083074 x23: 0x00000000000831e8
x22: 0x0000000000083070 x23: 0x00000000000831e4
x24: 0x00000000000f4240 x25: 0x00000000000852a8
x26: 0x0000000000085738 x27: 0x0000000000085818
x28: 0x00000000000831e8 x29: 0x0000000000085588
x28: 0x00000000000831e4 x29: 0x0000000000085588
lr : 0x0000000000080e44
```

Binary file not shown.

@ -162,15 +162,15 @@ impl PL011UartInner {
/// Set up baud rate and characteristics.
///
/// Results in 8N1 and 115200 baud (if the clk has been previously set to 4 MHz by the
/// Results in 8N1 and 230400 baud (if the clk has been previously set to 48 MHz by the
/// firmware).
pub fn init(&self) {
// Turn it off temporarily.
self.CR.set(0);
self.ICR.write(ICR::ALL::CLEAR);
self.IBRD.write(IBRD::IBRD.val(26)); // Results in 115200 baud for UART Clk of 48 MHz.
self.FBRD.write(FBRD::FBRD.val(3));
self.IBRD.write(IBRD::IBRD.val(13));
self.FBRD.write(FBRD::FBRD.val(2));
self.LCRH
.write(LCRH::WLEN::EightBit + LCRH::FEN::FifosEnabled); // 8N1 + Fifo on
self.CR

Binary file not shown.

Binary file not shown.

@ -165,15 +165,15 @@ impl PL011UartInner {
/// Set up baud rate and characteristics.
///
/// Results in 8N1 and 115200 baud (if the clk has been previously set to 4 MHz by the
/// Results in 8N1 and 230400 baud (if the clk has been previously set to 48 MHz by the
/// firmware).
pub fn init(&self) {
// Turn it off temporarily.
self.CR.set(0);
self.ICR.write(ICR::ALL::CLEAR);
self.IBRD.write(IBRD::IBRD.val(26)); // Results in 115200 baud for UART Clk of 48 MHz.
self.FBRD.write(FBRD::FBRD.val(3));
self.IBRD.write(IBRD::IBRD.val(13));
self.FBRD.write(FBRD::FBRD.val(2));
self.LCRH
.write(LCRH::WLEN::EightBit + LCRH::FEN::FifosEnabled); // 8N1 + Fifo on
self.CR

Binary file not shown.

Binary file not shown.

@ -162,15 +162,15 @@ impl PL011UartInner {
/// Set up baud rate and characteristics.
///
/// Results in 8N1 and 115200 baud (if the clk has been previously set to 4 MHz by the
/// Results in 8N1 and 230400 baud (if the clk has been previously set to 48 MHz by the
/// firmware).
pub fn init(&self) {
// Turn it off temporarily.
self.CR.set(0);
self.ICR.write(ICR::ALL::CLEAR);
self.IBRD.write(IBRD::IBRD.val(26)); // Results in 115200 baud for UART Clk of 48 MHz.
self.FBRD.write(FBRD::FBRD.val(3));
self.IBRD.write(IBRD::IBRD.val(13));
self.FBRD.write(FBRD::FBRD.val(2));
self.LCRH
.write(LCRH::WLEN::EightBit + LCRH::FEN::FifosEnabled); // 8N1 + Fifo on
self.CR

@ -44,7 +44,7 @@ class MiniPush
def open_serial
wait_for_serial
@target_serial = SerialPort.new(@target_serial_name, 115_200, 8, 1, SerialPort::NONE)
@target_serial = SerialPort.new(@target_serial_name, 230_400, 8, 1, SerialPort::NONE)
# Ensure all output is immediately flushed to the device.
@target_serial.sync = true

Loading…
Cancel
Save