Skip to content

Conversation

LukasP46
Copy link
Collaborator

Moved from #1173 and #1205.

  • Add twd dummy register to allow continuous reading of same byte as host when enabled
  • Separate RX/TX FIFO depth Generic
  • Add hide read option to only ACK own Device-Address when the TX Fifo is not empty
  • Add twd demo
  • Add twd bootloader

Tested only on release 1.10.9

@LukasP46 LukasP46 added enhancement New feature or request HW Hardware-related SW Software-related labels Mar 17, 2025
@LukasP46 LukasP46 marked this pull request as draft March 17, 2025 12:20
@LukasP46 LukasP46 marked this pull request as ready for review March 17, 2025 12:23
@stnolting
Copy link
Owner

Thanks for the update!

Give me/us some time for the review.

@@ -211,7 +213,7 @@ https://stnolting.github.io/neorv32/ug/#_programming_an_external_spi_flash_via_t
:sectnums:
==== Auto Boot Sequence

When you reset the NEORV32 processor, the bootloader waits 8 seconds for a UART console input before it
When you reset the NEORV32 processor, the bootloader waits 8 seconds for a UART console or TWD input before it
Copy link
Owner

Choose a reason for hiding this comment

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

TWD = disbaled by default

@@ -224,6 +226,7 @@ is no valid boot image found, and error code will be shown.

If something goes wrong during bootloader operation an error code and a short message is shown. In this case the processor
is halted (entering <<_sleep_mode>>), the bootloader status LED is permanently activated and the processor has to be reset manually.
A 4-left-shifted word of the error code is also readable as TWD.
Copy link
Owner

Choose a reason for hiding this comment

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

TWD = disbaled by default

@LukasP46 LukasP46 marked this pull request as draft March 18, 2025 08:22
@LukasP46
Copy link
Collaborator Author

The bootloader's TWD feature should be disabled by default, right?

Oh damn, at first I thought I could leave it enabled, but the executable gets too big again. That's why the documentation is wrong.
Where should I move the information about the TWD bootloader? A new section in the datasheet or in the user guide?

@LukasP46
Copy link
Collaborator Author

I messed up this branch again a bit, damn it. Sorry for the force-push (with lease). One more might be coming.

@LukasP46 LukasP46 requested a review from stnolting March 18, 2025 11:57
@LukasP46
Copy link
Collaborator Author

Checks still fail, I'll look into it.

@Unike267
Copy link
Collaborator

Hi!

I've had a busy start to the week, but I'd like to take a look at this, seems that Lukas has put in a lot of hard work to get it done! ♥️

(Of course, in parallel with Stephan's review.)

It may take a couple of days or so. 😅

@stnolting
Copy link
Owner

Just an idea: maybe we should move the bootloader stuff into another PR so we can focus on the TWD modifications here. What do you think?

@LukasP46
Copy link
Collaborator Author

Just an idea: maybe we should move the bootloader stuff into another PR so we can focus on the TWD modifications here. What do you think?

We can do that. Should I create separate PRs for each, remove the bootloader stuff with a commit, or rebase and remove the bootloader commits?

@stnolting
Copy link
Owner

We can do that. Should I create separate PRs for each, remove the bootloader stuff with a commit, or rebase and remove the bootloader commits?

Thanks!
That depends on you - whichever is easier for you.

LukasP46 added 12 commits March 24, 2025 08:45
Add new register to allow continuous reading of same byte as host when enabled.
Always NACK during the transfer, if the FIFO is full.
Enables finer control to reduce size for application-specific scenarios
Add hide read option to only ACK own Device-Address when the TX Fifo is not empty
@LukasP46 LukasP46 marked this pull request as ready for review March 24, 2025 08:28
@stnolting
Copy link
Owner

I think I've seen a few more typos in the docs, but that doesn't matter for now. The rest looks really good! Many thanks for all your work!

@stnolting
Copy link
Owner

I made some minor edits.

I think this ready for merge. 🚀

@stnolting stnolting merged commit b244eac into stnolting:main Mar 25, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request HW Hardware-related SW Software-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants