Program an STM32F411 with an Raspberry Pi

Post here first, or if you can't find a relevant section!
Sparky
Posts: 8
Joined: Tue Jun 27, 2023 9:34 am

Re: Program an STM32F411 with an Raspberry Pi

Post by Sparky »

I would like to thank you for your contribution, I was able to take your suggestion which consisted to use STlink adapter which works fine. I also tested the UART serial connection RX, TX. Both method works fines.
There is issue concerning the upload, When I am trying to upload the new code. I have to put manually the boot0 in position 1, then press the reset botton. Is there a way to do it without passing through processes just like in the Arduino microcontroller
ag123
Posts: 1668
Joined: Thu Dec 19, 2019 5:30 am
Answers: 25

Re: Program an STM32F411 with an Raspberry Pi

Post by ag123 »

one way though is to use a gpio pin on the RPi gpio header to control the boot0 pin if you prefer to do that ;)
I've not done that before, but just guessed it is likely possible.

st-link works without having to mess with the boot0 pin.
but for most of the uart, DFU etc boot modes the design is tied to the boot0 pin
https://www.st.com/resource/en/applicat ... ronics.pdf

Alternative means may be possible in software by your sketch, but one'd need to review the ref manual and dig through the registers to find that possibility.
https://www.st.com/resource/en/referenc ... ronics.pdf
the interesting section is
2.4 Boot configuration
and
7.2.1 SYSCFG memory remap register (SYSCFG_MEMRMP)
my guess is it could be as 'simple' as set the register, then call
NVIC_GenerateSystemReset();
or
NVIC_SystemReset()
^ there are some problems reported with this one
https://community.st.com/t5/stm32-mcu-p ... d-p/505088
Last edited by ag123 on Tue Jul 11, 2023 3:39 pm, edited 2 times in total.
Sparky
Posts: 8
Joined: Tue Jun 27, 2023 9:34 am

Re: Program an STM32F411 with an Raspberry Pi

Post by Sparky »

I will give a try then give you the feedback. thank you :roll:
Sparky
Posts: 8
Joined: Tue Jun 27, 2023 9:34 am

Re: Program an STM32F411 with an Raspberry Pi

Post by Sparky »

The gpio pin on the RPi gpio header works, thanks ag123
Post Reply

Return to “General discussion”