New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Nano 33 BLE Board #1909
Add Nano 33 BLE Board #1909
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a board to test this on but overall it looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two comments for you, but I think this is good to go. I tested it on hardware (in the nano33_3
branch) and found it to work great.
fn write(&mut self, buf: &[u8]) { | ||
let uart = unsafe { &mut nrf52840::uart::UARTE0 }; | ||
if !self.initialized { | ||
self.initialized = true; | ||
uart.configure(uart::Parameters { | ||
baud_rate: 115200, | ||
stop_bits: uart::StopBits::One, | ||
parity: uart::Parity::None, | ||
hw_flow_control: false, | ||
width: uart::Width::Eight, | ||
}); | ||
} | ||
for &c in buf { | ||
unsafe { | ||
uart.send_byte(c); | ||
} | ||
while !uart.tx_ready() {} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How hard would it be to have the panic dump print out over USB instead of UART (or in addition)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really hard, maybe impossible? I don't know how to do it without interrupts.
It might be worth thinking about handling panics in apps differently so that the kernel is still running while the panic message is printed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I won't block this PR on it, but we're going to have to think of some way to at least be able to debug crashing apps over USB serial if we want this to be a first-class board.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GPIO numbers now match what is written on the board.
Co-authored-by: Branden Ghena <brghena@berkeley.edu>
bors r+ |
Pull Request Overview
This pull request adds a board main.rs for the long-discussed (see #994) Nano 33 BLE board. Since it is based on the nrf52840, this is pretty straightforward.
The bootloader situation is not the best at the moment, but that is a work in progress. Also right now the UART requires attaching an FTDI chip to the UART pins. However, when the CDC USB stack is merged we can switch to using the USB header.
Testing Strategy
This pull request was tested by running the hello loop and blink apps on the board.
TODO or Help Wanted
n/a
Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.