element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
STMicroelectronics
  • Products
  • Manufacturers
  • STMicroelectronics
  • More
  • Cancel
STMicroelectronics
Forum Can I change bootloader UART pins for STM32F030F4 ?
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join STMicroelectronics to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 3 replies
  • Answers 1 answer
  • Subscribers 12 subscribers
  • Views 2275 views
  • Users 0 members are here
  • stm32f030f4
  • stm32f0
Related

Can I change bootloader UART pins for STM32F030F4 ?

camuyano
camuyano over 9 years ago

I am using a STM32F030F4 chip. This chip has one UART and one I2C.

I want to have the UART always connected to a usb to serial chip for firmware upgrade via the bootloader. But I wanted to use the I2C as well for some sensor.

From CubeMX I see there are two set of pins that can be used for UART.

 

As default I see UART on PA9 and PA10. Pins.PA9 and PA10 are the pins used for I2C.

The CubeMX let me change UART to PA2 and PA3,

 

My Question is:

Can I change the chip bootloader so I have PA2 and PA3 as UART and leave PA9 and PA10 open for I2C ?

This is how I would like to be on bootloader.

image

Thought that if this can be changed for run mode, should be possible to change for bootloader, but I do not have the factory bootloader source code to change it.

I would like to stay with a bootloader similar to the one from factory to keep official tools compatibility. But wanted the UART to move from PA9-PA10 to PA2-PA3 if possible.

I am totally new to STM32, this is a shot in the dark in case it is possible.

Any comment is welcome.

  • Sign in to reply
  • Cancel

Top Replies

  • michaelkellett
    michaelkellett over 9 years ago +1 verified
    You can't boot on PA2/3 (check out ST AN2606, page 29 - this is the bootloader documentation for STM32 family). You could bit-bang the I2C on any pair of IO pins - what chip is on I2C and how often do…
Parents
  • michaelkellett
    0 michaelkellett over 9 years ago

    You can't boot on PA2/3 (check out ST AN2606, page 29 - this is the bootloader documentation for STM32 family).

     

    You could bit-bang the I2C on any pair of IO pins - what chip is on I2C and how often do you need to talk to it ?

     

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
Reply
  • michaelkellett
    0 michaelkellett over 9 years ago

    You can't boot on PA2/3 (check out ST AN2606, page 29 - this is the bootloader documentation for STM32 family).

     

    You could bit-bang the I2C on any pair of IO pins - what chip is on I2C and how often do you need to talk to it ?

     

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
Children
  • camuyano
    0 camuyano over 9 years ago in reply to michaelkellett

    Thanks very much. Seems that I will be stuck with those pins for UART.

    If I for some reason mess up the bootloader on a STM32 chip, can I reload it or at least take it out from one chip and copy to another? With these STM32 chips I have not found actual binaries for bootloader neither it's code. The process is well documented but not actual official code.

     

    I wanted to talk possibly to up to two other chips.

    There are two possible chips to talk to. The rate at which I'll be reading from these devices may vary but it can be pretty slow.

    - 3Axis Compass HMC5883L

    - LM75A Temperature sensor

    I may use different sensors, however these were the cheapest I could find. I have never used neither of them but they were cheap. I ordered one of each to test them out in the near future.

     

    For reference:

    What I am doing is making a badge for a convention. Mostly it will be gimmick that will be handed to everyone who assist.

    The badge will have a USB port with a usb to serial chip that will be connected to the STM32. This for programming and to communicate with a PC is necessary. I will be making some scripting code for the PC side so the participants can either interact with the badge from a PC or download code to the badge.

    The badge will have a led matrix with some shift registers connected to the SPI so I can do DMA transfer ease the load on the CPU (or at least I'll try).

    Also the circuit will have a few buttons (apart of the reset and Boot0) and a "vibration" sensor that will be connected pretty much to any GPIO that is left. Since this is pretty much a switch activated on movement.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 9 years ago in reply to camuyano

    The bootloader in the STM32 chips is safe from corruption - there is no way (that I know) for you to break it.

     

    There should be no problem talking to the two chips you mention using bit banged I2C.

     

    The code is easy enough to write or you may be able to find examples on the web.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube