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

Split out hal implementation to efm32hg-hal crate #23

Merged
merged 10 commits into from
Oct 23, 2019
Merged

Conversation

fudanchii
Copy link
Owner

@fudanchii fudanchii commented Feb 1, 2019

Try to leverage gpio and cmu hal implementation from efm32gg-hal.

  • Remove some peripherals to be rewritten later
  • Remove enable_trace, sadly dcb is not available in cortex-m0+
  • Remove MonoTimer, sadly dwt lacks cyccnt support in cortex-m0+

It compiles, but still not in runnable state. It compiles and all examples are running now.

on progress...

@jacobrosenthal
Copy link
Contributor

Dont forget
jacobrosenthal/efm32gg-hal@adea5bd

@jacobrosenthal
Copy link
Contributor

I also found that the bit banding doesnt seem to work, I temporarily tried outclr and outset implementation which worked
jacobrosenthal/efm32gg-hal@42008ea

@jacobrosenthal
Copy link
Contributor

This is where I got with those fixes
https://github.com/jacobrosenthal/imtomu-rs/tree/efm32-hal-delay

Since he doesnt wrap systick I had to have multiple delays to get to 1 second, which seems to work

@jacobrosenthal
Copy link
Contributor

Also, moved watchdog over to a pr there chrysn/efm32gg-hal#3 seemed to work

@fudanchii
Copy link
Owner Author

I also found that the bit banding doesnt seem to work, I temporarily tried outclr and outset implementation which worked

Noted. bit-banding seems to not available at cortex M0+, confirmed at silabs' own knowledge base:
https://www.silabs.com/community/mcu/32-bit/knowledge-base.entry.html/2016/04/04/understanding_periph-xqkx

I'll work on the gpio in a bit more, also would like to have all the gpio modes back for efm32hg.

I think @chrysn already stated some concerns related to this (the availability of gpio set/clear registers). We could discuss this further over there.

@fudanchii
Copy link
Owner Author

fudanchii commented Feb 2, 2019

We could discuss this further over there.

em32-rs/wg#6

}

/// Common trait for leds
pub trait LedTrait {
Copy link
Contributor

Choose a reason for hiding this comment

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

Small nitpick. Can we get the LedTrait back. Tried to use it for something and noticed it was gone :)

Copy link
Owner Author

Choose a reason for hiding this comment

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

Added. sorry I took my time on this.

@fudanchii
Copy link
Owner Author

this closes #15

@fudanchii fudanchii changed the title WIP attempt to unify hal Split out hal implementation to efm32hg-hal crate Oct 23, 2019
@fudanchii fudanchii merged commit 076d552 into master Oct 23, 2019
@fudanchii fudanchii deleted the efm32-hal branch October 23, 2019 14:28
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.

None yet

2 participants