Skip to content

STM32: Add PYB Nano support #2315

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

Merged
merged 13 commits into from
Dec 10, 2019
Merged

STM32: Add PYB Nano support #2315

merged 13 commits into from
Dec 10, 2019

Conversation

hierophect
Copy link
Collaborator

This PR adds support for the PYB Nano V2, which uses the STM32F411CE on a small form factor board with a W25Q64JV_IQ for external flash support and a built in MMA7660FC accelerometer. Tested for flash operation and multiple modules of support with success.

Drops the Blackpill from #2312, since it has proven flaky in testing. Partially addresses #2196

@ladyada
Copy link
Member

ladyada commented Nov 22, 2019

please upload a photo or diagram showing what external chips you have wired up

@tannewt
Copy link
Member

tannewt commented Nov 22, 2019

Please remove the stm32f401 changes from here since the PYB Nano is a 411. No need to open a new PR though. Just push a new commit here.

@hierophect
Copy link
Collaborator Author

@tannewt sure, good catch. Those should go in with the Meowbit

@hierophect
Copy link
Collaborator Author

@ladyada Here's a photo of a full test rig:
IMG_2509
Here's the PYB nano pinout. Tested using I2C1, SPI1 + X8 CS, A0, PWM on X1, and the TX/RX on X2/X3 (if you try the other serial note that the TX/RX on PB7 and PB6 in this picture is WRONG, they're switched, R:7 T:6).
pybnano_pinout
Test code (all pins already named):
testcode.py.zip
Bin:
firmware.bin.zip

Currently this code suffers the #2346 issue, but that's across all 8MHz boards, so I'm working on it separately.

@ladyada
Copy link
Member

ladyada commented Dec 2, 2019

thanks I realized i actually have a different board - so i ordered a bunch of em :) the board i have this this one: https://www.aliexpress.com/item/4000069263843.html which has a 25mhz xtal. it'll be a week till i get the pybnano in, dya wanna try making a def for this board intead/as well?

@hierophect
Copy link
Collaborator Author

@ladyada I actually have done all the pin definitions for that as the "blackpill" (you recommended both a couple months back, I think), but I've had some problems, which is why I dropped #2312. It's erratic to flash (frequently fails validation or won't load the flash loader, doesn't work at all with gdb, etc), and I can't get USB to enumerate. I can keep hacking at it, but the PYB Nano is MUCH more stable with the same MCU (F411) which makes me wonder if there's a sourcing related issue with the blackpill.

Do you have the schematics for the blackpill, by the way? I couldn't get them to download off Baidu without an account

@ladyada
Copy link
Member

ladyada commented Dec 2, 2019

minif4 v1 3
minif4 2 0

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! Thanks!

@tannewt tannewt merged commit 387ab6c into adafruit:master Dec 10, 2019
@hierophect
Copy link
Collaborator Author

@tannewt @ladyada cool cool. Did we get a chance to double check the board?

@ladyada
Copy link
Member

ladyada commented Dec 10, 2019

my order hasnt come in yet :(

@hierophect
Copy link
Collaborator Author

All good we can probably just revisit. I tested it pretty thoroughly I don't think we should see any issues.

@tannewt
Copy link
Member

tannewt commented Dec 10, 2019

We can always fix it later. :-)

@ladyada
Copy link
Member

ladyada commented Dec 10, 2019

yep thank you :)

@ladyada
Copy link
Member

ladyada commented Dec 10, 2019

@makermelissa this'll need a circuitpython.org card!

@makermelissa
Copy link
Collaborator

Ok

@hierophect hierophect deleted the stm32-pyb-nano branch December 30, 2019 15:59
@hierophect hierophect added the stm label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants