2025-01-27 03:36 AM - last edited on 2025-01-27 05:05 AM by SofLit
Hi, I am using the STM32 NUCLEO-F401RE board and have already use the HAL APIs to blink the led. now I want to blink the onboard user led [LD2] using the FTDI module and want to use the USART6 for it can anyone please help and explain me in detail that how I will be doing this?
2025-01-27 03:42 AM
Welcome to the forum
I'm not entiorely clear what you're actually asking:
2025-01-27 03:48 AM
Yes, my main task is that I want to upload the firmware via uart because stlink is connected to the uart2. and I want to use the other uart. that's why inquiring about how I can upload the code via another uart and bipass the st-link?
2025-01-27 03:54 AM
Hello @mohite25 and welcome to the community,
Need to refer first to the AN2606 / Section 31 STM32F401xD(E) devices:
These are the USARTs and theirs respective pins that you can use with the bootloader for this product:
And you cannot use other pins.
Hope that helps.
2025-01-27 04:07 AM - edited 2025-01-27 04:17 AM
@mohite25 wrote:I want to upload the firmware via uart because stlink is connected to the uart2.
That doesn't really make sense.
The ST-Link has two connections to the Target microcontroller:
So using the ST-Link for programming (downloading) does not preclude using the UART for comms.
PS:
Or, if you want to disconnect that UART from the ST-Link, you can do that and still retain the SWD programming connection.
2025-01-27 04:27 AM
Thank you, @SofLit, for taking the time to answer my question! I really appreciate your help.
Based on the guidance in AN260, I have followed the necessary steps to use USART1 for communication. Here’s what I have done so far:
After making these connections, I connect the FTDI module to my laptop and follow these steps:
However, despite following these steps, I am still encountering an error. Could you please help me troubleshoot this issue? Any suggestions would be greatly appreciated!
2025-01-27 04:42 AM - edited 2025-01-27 04:47 AM
@mohite25 wrote:However, despite following these steps, I am still encountering an error. Could you please help me troubleshoot this issue?
For a start, you'd need to say what error, exactly, you are encountering.
Please post a screenshot showing the error(s) and/or copy & paste the error text.
For pasting error text, see: https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/725146/highlight/true#M54
Also show your connections between the Nucleo board and the FTDI UART-to-USB converter.
I'm still unclear why you want to go through all the hassle of using a UART when you have a perfectly good ST-Link which will do it far more conveniently via the SWD connection?
2025-01-27 04:43 AM - edited 2025-01-27 04:45 AM
Which USART1 Tx/Rx pins you have used? PA9 and PA10?
Also check your connections and check your FTDI module (Are you sure your FTDI is normally working either on Tx or on Rx?).
2025-01-27 04:47 AM
I am encountering the above error, and for clarity, my goal is to flash the firmware using the UART bootloader.
2025-01-27 04:50 AM
@mohite25 wrote:
I am encountering the above error, and for clarity, my goal is to flash the firmware using the UART bootloader.
Are you sure the FTDI is on COM12?