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

stm: enable RGBMatrix #2831

Merged
merged 1 commit into from
May 6, 2020
Merged

stm: enable RGBMatrix #2831

merged 1 commit into from
May 6, 2020

Conversation

jepler
Copy link
Member

@jepler jepler commented Apr 29, 2020

Testing performed: on stm32f405 feather, drove a 16x32 display.

As far as going to other stm microcontrollers, the main sticking point is the timer. I statically allocated TIM6 for this purpose (because TIM6 is not associated with any PWM pins); we need to have a "timer allocator" in the stm port, which @tannewt and @hierophect have both commented on. Not even the whole F4 family has TIM6, so this enables only STM32F405xx for now.

@ladyada
Copy link
Member

ladyada commented Apr 29, 2020

i can test once you need a verifier!

@jepler jepler force-pushed the rgbmatrix-stm branch 2 times, most recently from ac0fdf9 to 9327a2c Compare April 29, 2020 18:40
Testing performed: on stm32f405 feather, all pins change in plausible ways
on a logic probe.  Didn't actually drive a display yet.
@jepler
Copy link
Member Author

jepler commented Apr 30, 2020

@ladyada Give this a whirl now. The artifacts are ready -- looks like your download link is https://github.com/adafruit/circuitpython/suites/642483319/artifacts/5391473

@jepler
Copy link
Member Author

jepler commented Apr 30, 2020

Leaving this in Draft state until the PR in protmatter gets merged, adafruit/Adafruit_Protomatter#6

@hierophect
Copy link
Collaborator

So what's the distinction between rgbmatrix and protomatter again? Are we transitioning to just one, or using both for different things?

@hierophect
Copy link
Collaborator

Also @ladyada should I pick one of these up so I can test it when reworking this basic vs general-purpose timer issue?

@dhalbert
Copy link
Collaborator

dhalbert commented Apr 30, 2020

So what's the distinction between rgbmatrix and protomatter again? Are we transitioning to just one, or using both for different things?

Protomatter is the name of the original Arduino library, which forms the core implementation in Cpy. That name is not going to change. The user-visible interface was called protomatter in CPy, too, but was renamed to rgbmatrix for clarity.

@ladyada
Copy link
Member

ladyada commented Apr 30, 2020

@hierophect yah a 32x32 is plenty large!

@jepler jepler changed the title stm: enable protomatter stm: enable RGBMatrix Apr 30, 2020
@jepler
Copy link
Member Author

jepler commented Apr 30, 2020

I retitled the PR for clarity.

@jepler
Copy link
Member Author

jepler commented Apr 30, 2020

@ladyada whoops, wiring details:

matrix = rgbmatrix.RGBMatrix(
    width=64, height=32, bit_depth=1,
    rgb_pins=[board.D13, board.D12, board.D11, board.A4, board.A5, board.D6],
    addr_pins=[board.A0, board.A1, board.A2, board.A3],
    clock_pin=board.D5, latch_pin=board.D9, output_enable_pin=board.D10, doublebuffer=False)

@tannewt tannewt requested a review from dhalbert April 30, 2020 18:32
@jepler jepler marked this pull request as ready for review May 5, 2020 13:51
@jepler jepler requested a review from hierophect May 5, 2020 13:51
@jepler
Copy link
Member Author

jepler commented May 5, 2020

Testing performed: simple scroller on stm32f405 feather, and re-tested simple scroller on nrf52840 feather

Copy link
Collaborator

@hierophect hierophect left a comment

Choose a reason for hiding this comment

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

@jepler This looks good to me generally, but I've got questions about your addition of the common-hal functions which imply iterable pins, which I've tried to avoid for this port.

ports/stm/common-hal/microcontroller/Pin.c Show resolved Hide resolved
ports/stm/common-hal/rgbmatrix/RGBMatrix.c Show resolved Hide resolved
@jepler jepler requested a review from hierophect May 6, 2020 12:56
@hierophect
Copy link
Collaborator

Looks good to me

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Looks good to me too.

@tannewt tannewt merged commit c3b3eb4 into adafruit:master May 6, 2020
jepler added a commit to jepler/circuitpython that referenced this pull request May 7, 2020
jepler added a commit to jepler/circuitpython that referenced this pull request May 7, 2020
dhalbert added a commit that referenced this pull request May 8, 2020
Fix build after #2831 (stm32f4xx rgbmatrix) broke it
@ladyada
Copy link
Member

ladyada commented May 10, 2020

@jepler ok finally got around to testing on the stm32f405 and works great :) please add the feather fritzing documentation in the next week or two to the guide

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.

5 participants