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

Final(?) fixes for Oxcon board. #1542

Merged
merged 1 commit into from
Sep 20, 2023
Merged

Final(?) fixes for Oxcon board. #1542

merged 1 commit into from
Sep 20, 2023

Conversation

cbiffle
Copy link
Collaborator

@cbiffle cbiffle commented Sep 19, 2023

  • Add insomniac feature to suppress sleep at WFI because Humility
    doesn't know how to attach to an STM32G0 that is sleeping.

  • Fix bug in user leds "blink on start" feature that failed to actually
    set up blink on start, because there are several pieces of data to
    update and I missed two of them.

@cbiffle cbiffle requested a review from mkeeter September 19, 2023 16:21
@cbiffle cbiffle force-pushed the oxcon2023g0-fixes branch 2 times, most recently from 49759b7 to 06f1681 Compare September 19, 2023 18:09
led_on(led);
self.blink_state = false;

if !any_blinking {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd suggest keeping the led_on(led) call here, so that going from off to blinking is obviously right away (otherwise, you have to wait for a BLINK_INTERVAL).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So, in practice, if I leave that line in, the LED starts off. I'm not sure why. Was it blinking immediately before?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That confuses me! The point of this line was to get immediate feedback when calling led_blink (if other LEDs weren't already blinking), and I'm pretty sure it worked. I'd have to think through it a little more to understand why it's not working in this case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I assumed it had something to do with the previously ambiguous nature of blink_state (where blink_state of false appeared to mean on?). But, had to remove this to make the feedback immediate.

@cbiffle cbiffle force-pushed the oxcon2023g0-fixes branch 3 times, most recently from 43768a0 to db16b8c Compare September 19, 2023 21:22
- Add insomniac feature to suppress sleep at WFI because Humility
  doesn't know how to attach to an STM32G0 that is sleeping.

- Fix bug in user leds "blink on start" feature that failed to actually
  set up blink on start, because there are several pieces of data to
  update and I missed two of them. I've simplified it.

- Remap to make pins A9 and A10 available -- they're muxed away on G0 by
  default and need to be activated (see main). Extra fun because the
  relevant bits in the PAC are wrong.

- Fix I2C pin mapping for the actual fabbed board.

- Activate PLL and boost CPU to 64 MHz for bragging rights.

- Adjust I2C clock configuration to account for that.
@cbiffle cbiffle marked this pull request as ready for review September 19, 2023 21:25
@cbiffle cbiffle enabled auto-merge (rebase) September 19, 2023 21:25
@cbiffle cbiffle merged commit cde51d0 into master Sep 20, 2023
71 checks passed
@cbiffle cbiffle deleted the oxcon2023g0-fixes branch September 20, 2023 16:43
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.

2 participants