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
Program an STM32F411 with an Raspberry Pi
Re: Program an STM32F411 with an Raspberry Pi
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

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.
Re: Program an STM32F411 with an Raspberry Pi
I will give a try then give you the feedback. thank you 

Re: Program an STM32F411 with an Raspberry Pi
The gpio pin on the RPi gpio header works, thanks ag123