2023-11-29 11:03 AM
Hello,
I'm designing a pcb with a STM32L031 MCU. I will use serial UART2 for bootload and debug.
In ST application note nº2606 and "STM32L031x4 STM32L031x6 datasheet", it is said :
"The boot loader is located in System memory. It is used to reprogram the Flash memory by
using SPI1 (PA4, PA5, PA6, PA7), USART2 (PA2, PA3) or USART2 (PA9, PA10). See
STM32™ microcontroller system memory boot mode AN2606 for details."
My question is : Is it possible to flash the device with USART2 but with USART2_TX located on PA14 and not PA2 ?
My application context makes it mandatory insofar as PA2 is already used for ADC purpose.
Thank you very much for any help !
2023-11-29 11:36 AM
No. The firmware is in ROM and not flexible to your needs.
AN2606 defines the pins it can use.
2023-11-29 11:36 AM
No, bootloader pins are hard coded and cannot be changed.
2023-11-29 11:51 AM
@Arthur21 wrote:My question is : Is it possible to flash the device with USART2 but with USART2_TX located on PA14 and not PA2 ?
Reply is yes you can, but no over system bootloader. Split flash and create custom bootloader.
2023-11-29 01:45 PM
Ok thanks, I hadn't thought about that.
I am novice in embedded systems. Can you tell me if remapping an ADC channel to another pin is possible ? I didn't succeeded in stmCube UI, I guess it is because of hardware limitations ? Or is it only adefault pin, and a software configuration is possible ?
Thanks
2023-11-30 08:00 AM
You dont write used package, but ADC channels is static. You have amount of channels based on package and core.
2023-11-30 08:55 AM
Hello @Arthur21 ,
Select another channel for ADC and leave PA2 for the bootloader.