Closed twasilczyk closed 3 years ago
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.
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)
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?
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.
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.
Thanks! Should I wait with merging for the other PR, or submit this first?
No, I just got distracted and forgot to actually merge…
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: