-
Notifications
You must be signed in to change notification settings - Fork 20
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
Initial STM32WBx5 support. #1
base: master
Are you sure you want to change the base?
Conversation
Devices in this series:
the suffix denotes the flash/RAM sizes: 256, 512, 1024 (flash) and 128, 256, 256 (RAM). I'm wondering what the best method of designating these devices is, but I start to think I should change STM32WBx5 to STM32WB55{C,R,V}x? |
This is great! I appreciate your effort. Regarding to naming, I think it should be You should also add a variant to the
|
Roger that, so it stays as-is then.
I just found out about that, incoming commit!
Roger. I'll read the reference manual carefully for that, since I never changed the default frequency before. I want as far as having a blinking light...
Previous experiments were bare-bones with this existing PAC crate, and I used openocd. I'm not sure whether that's easily possible here?
The PAC crate above has an svd, and I've pending changes for Thanks for your comments :-) EDIT: for openocd, you need a set of patches, since these new MCUs aren't yet upstream for openocd. If you want, I have a PKGBUILD for a custom openocd build. |
WRT to clock: RCC_CR:
This means that POR turns on the The documentation for Seems like I can "just" add the device to the list of STM32L4's, as I suspected. Do I need to take action for the post-standby clock mode? Reset, wakeup and shutdown low-power all reset to MSI clock. |
A nitpick: I think
Sure, openocd is possible, but
Great! Did you find the SVD file somewhere or created it by yourself?
Thanks, but I don't have this MCU currently. I think it's worth to order it now.
Great, let's add it to the 4MHz list. For subsequent clock changes in the run-time, the itm::update_prescaler function should be used. This all is needed to maintain a constant baud rate for the SWO pin output. Actually SWO output can be set in Manchester encoding, thus the speed can vary in the run-time, but we've found it as not reliable. And Drone needs a reliable channel for its heap-tracing functionality. Do you have a separate USB-UART converter? |
Roger.
I'll have a look at that too!
I've found it in that repo, not mine... Probably worth finding out were it comes from: https://github.com/eupn/stm32wb-pac/tree/master/svd
The nucleo pack comes with two different ones, and seems quite featureful. 40$ iirc, so not too expensive either.
I can probably find one in the lab here! I'm gonna pack things up for the weekend now, and have a ton of other stuff to do next week, but this is interesting. I'll finish up the patches maybe tomorrow or during next week! |
wrt the stm32-map: drone-os/drone-stm32-map#2 |
Sounds great! I will be on trip next week, and my presence will be restricted to my smartphone. Sorry in advance for my limited availability. |
I have been toying with BMP now. There's the experimental In the end, I used I changed the root task to illuminate an LED (so it's not in the dark anymore): // Set rcc clock
reg.rcc_ahb2enr.modify(|w| w.set_gpioben());
reg.gpiob_moder.modify(|w| w.write_moder5(0b01));
reg.gpiob_otyper.modify(|w| w.clear_ot5());
reg.gpiob_ospeedr.modify(|w| w.write_ospeedr5(0b00));
reg.gpiob_pupdr.modify(|w| w.write_pupdr5(0b00));
reg.gpiob_bsrr.bs5.set_bit(); This is without mapping the registers in stm32-map; I will definitely need some aid there. So, the code in its current condition is usable as an STM32WB bootstrap! |
That looks great! I can help you with register mappings on weekends. I will also share an OpenOCD script to display the ITM output. |
@rubdos Please take a look at this set of tasks for OpenOCD: https://github.com/valff/demo-core-nucleo/blob/master/Justfile With this you should be able to capture the ITM output (the task is named I'm slightly refactoring |
It's a bit annoying that it depends on
Nice, let me know where I can help! |
HA, found it. I just had to alter the ITM frequency to the core clock (4MHz)! This is awesome. Now I have |
Hi again! My student (@Vanarill) started working on the WB55 Nucleo board. This one and the stm32-map repo got a rebase, and feedback (especially on how to proceed with the peripheral mapping) is mostly appreciated :-) |
We just tested generating a project with Next up we'll test |
Thank you for all your work. I already have the WB55 Nucleo board. Will test this soon. |
Co-authored-by: Ruben De Smet [email protected]
I pushed because |
I've been toying around with some WB series STMs, which supports concurrent Bluetooth and 802.15.4 comms.
I had been thinking about writing my own async reactor for those MCUs, but it seems like Drone has done most of the work already! This work looks very exciting for me.
This commit adds the STM32WBx5 to the device list and code generator. Feel free to let this hang around until I submit something for
drone-cortex-m
!EDIT: Reference manual.