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

Add support for ATmega128RFA1 #68

Merged
merged 1 commit into from
Aug 22, 2021
Merged

Conversation

twasilczyk
Copy link
Contributor

While the MCU itself isn't terribly fascinating, one of the devices using it is.

Smart Response XE is an obsolete classroom clicker, sold on eBay for ~$5 and available in large quantities. It's a compelling platform that's fully reverse engineered and ready to hack out of box:

  • ATmega128RFA1 MCU
  • 384x160 LCD display
  • QWERTY keyboard
  • External 1M SPI flash
  • Exposed ISP and JTAG headers
  • ZigBee transciever w/ antennas
  • Powered by 4 AAA batteries
  • Optional (unpopulated):
    • RS232
    • Debug LED
    • Buzzer
    • Accelerometer

@twasilczyk
Copy link
Contributor Author

This change is a WIP now, but I'm uploading it to get some initial feedback.

I'm planning to also implement Smart Response XE BSP for modm itself.

@salkinium
Copy link
Member

Oh wow, I didn't know about this, there are a lot of cool projects that use this device!

You did it exactly how I would've done it with the patch, great! But it's still missing some more signals, right?
I'm still a little sad that there are so many AVR devices with missing GPIO information…

(The CI wants you to synchronize docs: python3 tools/scripts/sync_docs.py then commit the result)

@twasilczyk
Copy link
Contributor Author

Thanks!

Yes, most of the signals are still missing. I'm adding them one by one and trying to test on the hardware or at least check if it builds. Then I'll do a final pass comparison between mega128A and this chip to make sure if there's nothing else I missed.

I only had one trouble with filling blanks in the atdf file: a lot of non-GPIO pins (primarily power pins, but also e.g. TST, RSTON and a few others) don't have 1:1 equivalents on other chips and I wasn't sure how to name them (e.g. is AVSS_RFP supposed to be named RFPGND, RFGND or GND, how about AVSS_RFN then). Or it doesn't matter for modm-devices?

@salkinium
Copy link
Member

The analog/power pins are not relevant for the HAL generation of modm, so you can leave them out. Only the ports/pins and signals are used by modm.

I added the packages for projects like stm_layout or pinfigurator, which use this data to query a pinout for a specific package, but the modm HAL doesn't/cannot care about physical pinout.

@twasilczyk twasilczyk marked this pull request as ready for review August 20, 2021 16:37
@twasilczyk
Copy link
Contributor Author

I filled all the remaining signals (except the ones not supported by modm, primarily RF) and cross-checked the output xml with datasheet. I am also quite confident about non-GPIO pins so I'll leave them in in case some other tool ever uses them.

This change is ready for review. Once it's in, I'll push a corresponding change to modm to re-enable this chip and fix one clock quirk.

Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

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

Excellent work!

@twasilczyk
Copy link
Contributor Author

Thanks! Should I wait with merging for the other PR, or submit this first?

@salkinium salkinium merged commit 2b667e1 into modm-io:develop Aug 22, 2021
@salkinium
Copy link
Member

No, I just got distracted and forgot to actually merge…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants