Skip to content
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

Use XtalClock as UART source and adapt interrupt binding #57

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

SergioGasquez
Copy link
Member

@SergioGasquez SergioGasquez commented Apr 18, 2024

  • Use XtalClock as UART source when possible
  • Update interrupt bindings

Testing

I've tried flashing a few targets (C6 and H2) with the generated stubs and they were working fine.

I've created https://github.com/SergioGasquez/espflash/tree/feat/test-stubs updating all the stubs and once esp-rs/espflash#625 is merged, I'll run espflash HIL CI on that branch so we can test all the targets with new stubs.

Here is the HIL run with the test stubs: https://github.com/esp-rs/espflash/actions/runs/8749962162

@@ -42,5 +43,5 @@ unsafe fn USB_DEVICE() {

reg_block
.int_clr()
.write(|w| w.serial_out_recv_pkt_int_clr().set_bit());
.write(|w| w.serial_out_recv_pkt().clear_bit_by_one());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -41,5 +46,5 @@ fn UART0() {
unsafe { RX_QUEUE.push_back(data).unwrap() };
}

uart.int_clr().write(|w| w.rxfifo_full_int_clr().set_bit());
uart.int_clr().write(|w| w.rxfifo_full().clear_bit_by_one());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cargo.toml Outdated Show resolved Hide resolved
@SergioGasquez SergioGasquez marked this pull request as ready for review April 19, 2024 07:54
Copy link
Contributor

@JurajSadel JurajSadel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM, just one typo in the interrupt handler

src/io/uart.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@MabezDev MabezDev merged commit 09944f9 into esp-rs:main Apr 19, 2024
22 checks passed
@SergioGasquez SergioGasquez deleted the feat/uart-source-clk branch April 19, 2024 11:10
@SergioGasquez SergioGasquez linked an issue Apr 23, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use XTAL_CLOCK as UART source
3 participants