Skip to content

Conversation

@simon-77
Copy link

I have added support for SAMD architecture type boards (Arduino MKR)

  • This code is tested on the Arduino MKR Zero up to a baud rate of 19200
  • Using a hardware timer in the same fashion as on the AVR boards
  • Due to a more difficult register setup on the SAMD architecture, I have implemented the In- & Output using Arduino functions. Therefore any pin can easily be used (by changing the #defines).

This modified code should behave the same on AVR boards as previously & add support for all SAMD architecutre micro controller boards.
When this pull request is merged, it would be great to also modify the compatibility in the Arduino Library manager to include the SAMD architecture / MKR family boards.

Best wishes,
Simon

@simon-77 simon-77 changed the title Adding support for MKR family Arduinos (SAMD architecture) Adding support for Arduino MKR family (SAMD architecture) May 31, 2024
@PaulStoffregen
Copy link
Owner

Is this ready to be merged? Or still adding more commits?

@simon-77
Copy link
Author

simon-77 commented Jun 6, 2024

This is ready to be merged, thank you for asking.

The first 4 commits where the "minimal" changes I made to the original code while adding compatibility for the MKR family.

I then added (with 2 additional) commits the ability to configure RX & TX pins via constructor for the MKR family, for which I have introduced 2 new static variables, which are default-initialized to the defines which are in use for the AVR microcontrollers, to keep everything compatible.
I did not consider that making further changes to my fork after creating the pull request would update it as well.
Therefore depend on your choice you can also only merge the first 4 commits (2f7fc02), although I think that the configurable RX & TX pins for the MKR family are a nice feature too.

Two more notes:

  • I am using this library in my current project on an MKR zero with a baud rate of up to 38400 very successfully
  • I noticed that the Arduino library manager does list this library as not compatible with MKR zero (and probably all boards of this family). It would be great if you could update this compatibility as well once this is merged.

Cheers Simon

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