Conversation
00dc127 to
82875e2
Compare
|
Note to self: #908 |
8367534 to
b169704
Compare
|
I've spent some more time on this today, and have moved the thumbv6 clock v2 support up to just before #728 . From a not-very-close inspection of the newer history of the project, this seems like the last major snag to resurrect this work. It seems like using diff/patch (IOW Git rebase) isn't a good approach to update the thumbv6 clock v2 work on to the new config scheme, there are tons of small changes spread through the codebase. I'm thinking that manually replicating the changes from the thumbv6 clock v2 work is the way forward, directly on to the current master. If anyone else feels like taking a crack at this, please feel free! |
c2282e3 to
7676db0
Compare
|
I've saved the branch that attempted to do this with rebase as clock_v2_thumbv6m_rebase and started manually transcribing the work on top of current master here. |
7676db0 to
08e9ec1
Compare
|
I've advanced to somewhere between Bradley's second and third "stash" commits, the code at the current head (commit message "WIP stash 2 enable v2 for thumbv6m") comments out some important stuff but builds much of the clock v2 code for thumbv6m (with some warnings that should be addressed), and the commit before that cleanly builds for thumbv7em (though isn't tested to still work). Some of the changes I've made are a little bit hacky; I'm trying to create a finer-grained history to keep things compiling in intermediate steps so that it'll be easier to go back and clean up that stuff once the bulk of the work is done. |
|
|
Have made a bit more progress on this today, largely splitting up the last few commits in clock_v2_thumbv6m_rebase to make them a bit easier to digest |
f3d9269 to
8931976
Compare
|
The bulk of the clock v2 support is now in place for SAMD21, I've not been exercising SAMD11 builds and those currently error. There are a couple of Bradley's changes that still need to be ported, and the above list of TODOs, I'll try to chip away at it more tomorrow. |
d03a44b to
fa7de36
Compare
|
Changes to clock v2 API for thumbv7 introduced by this PR:
|
36f5b4d to
a8d4920
Compare
8d8f126 to
bd81455
Compare
|
I've done some basic testing on both Metro M0 and Metro M4, seems to work OK. Will chip away at updating the tier-1 BSPs for thumbv6m chips, but this seems ready for wider testing and feedback if anyone's got spare cycles to work on it. |
7ce8fb9 to
7a2a60a
Compare
7a2a60a to
8b89a3b
Compare
|
Woohoo! Green tick from the CI. |
Couldn't deduplicate with the feather_m4 and metro_m4 examples, because the alias used for the LED is different. Sorting that out seems like a separate project.
Reading the GCLK GENCTRL register isn't possible on the thumbv6m chips, on these there is only one GENCTRL register for the whole GCLK peripheral, in contrast to one GENCTRL per generator on the thumbv7em chips. On the thumbv6m chips, modifying GENCTRL is done by atomically writing the whole register, which has a field for the generator ID to be modified. The GENCTRL register had been modified from the GclkToken<> impl, per-field, but the state required to fill the other fields for the atomic register write wasn't available in the GclkToken<> scope. So, these GENCTRL accesses were moved up in to the Gclk<> impl. One more bit of state was added to the settings to handle the Output Enable bit.
1a1a2b2 to
0fffb1d
Compare
| #[hal_cfg("i2s")] | ||
| (I2S0 = 35, i2s0) | ||
| #[hal_cfg("i2s")] | ||
| (I2S1 = 36, i2s1) |
|
@ianrrees this looks really good! After a long read of the PR over the past couple hours, I couldn't see anything drastically wrong with this, Ill get to testing later this week I hope, then I can hunt for some bugs |
| I2S = 10, | ||
| Pcc = 11, | ||
| I2S = (20, any, all) | ||
| Ac1 = (21, any, all) |
There was a problem hiding this comment.
| @@ -1,3 +1,5 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
#964 updated all the bash scripts to have a consistent shebang. This line can be removed if you want.
Resurrecting @bradleyharden's work on clockv2 for thumbv6m. Will begin by rebasing on to current master, then try to finish things up!