Skip to content

stm: enable RGBMatrix#2831

Merged
tannewt merged 1 commit into
adafruit:masterfrom
jepler:rgbmatrix-stm
May 6, 2020
Merged

stm: enable RGBMatrix#2831
tannewt merged 1 commit into
adafruit:masterfrom
jepler:rgbmatrix-stm

Conversation

@jepler

@jepler jepler commented Apr 29, 2020

Copy link
Copy Markdown

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

ladyada commented Apr 29, 2020

Copy link
Copy Markdown
Member

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

jepler commented Apr 30, 2020

Copy link
Copy Markdown
Author

@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

jepler commented Apr 30, 2020

Copy link
Copy Markdown
Author

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

@hierophect

Copy link
Copy Markdown
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
Copy Markdown
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

dhalbert commented Apr 30, 2020

Copy link
Copy Markdown
Collaborator

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

ladyada commented Apr 30, 2020

Copy link
Copy Markdown
Member

@hierophect yah a 32x32 is plenty large!

@jepler jepler changed the title stm: enable protomatter stm: enable RGBMatrix Apr 30, 2020
@jepler

jepler commented Apr 30, 2020

Copy link
Copy Markdown
Author

I retitled the PR for clarity.

@jepler

jepler commented Apr 30, 2020

Copy link
Copy Markdown
Author

@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

jepler commented May 5, 2020

Copy link
Copy Markdown
Author

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

@hierophect hierophect left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread ports/stm/common-hal/microcontroller/Pin.c
Comment thread ports/stm/common-hal/rgbmatrix/RGBMatrix.c
@jepler jepler requested a review from hierophect May 6, 2020 12:56
@hierophect

Copy link
Copy Markdown
Collaborator

Looks good to me

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

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
dhalbert added a commit that referenced this pull request May 8, 2020
Fix build after #2831 (stm32f4xx rgbmatrix) broke it
@ladyada

ladyada commented May 10, 2020

Copy link
Copy Markdown
Member

@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