DTR and RTS signal #1881
-
Hi community, However, by adding these line, DTR and RST wouldn't change. |
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments · 5 replies
-
Hi, The disableDTR/RTS does not enable the signal during the programming but prevents Serial Monitor from asserting the control signals when that board is selected, that's all. Programming via UART is manage by the STM32CubeProgrammer. Looking at the builtin bootloader specification, the UART does not use the DTR/RTS. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Do you mean there is no way to enable DTR/RTS signal on the serial port while I am programming my board with Arduino? Serial Port COM5 is successfully opened. Could it be because of that? |
Beta Was this translation helpful? Give feedback.
All reactions
-
This is the stm32cubeprogrammer . Check in the user manual if it can drive them. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Seems STM32CubeProgrammer able to set RTS and DTR signals level but honestly for default build-in bootloader in UART mode it is not used |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello, This is a late answer, but I just come to this problem and found the solution: So you just need to modify the command ${STM32CP_CLI} -c port=${PORT} ${MODE} ${ERASE:+"-e all"} -q -d "${FILEPATH}" "${ADDRESS}" -s "${ADDRESS}" "${OPTS}" by adding rts=low (or high) dtr=low (or high) depending your case. And That's all Folks! Here the full help page for STM32_CLI: Usage : Generic commands: -?, -h, --help : Show this help Available commands for STM32 MCU: --skipErase : Skip sector erase before programming -w64 : Write a 64-bits data into device memory : Start address of download <64-bit_data> : 64-bit data to be downloaded values should not be separated by space -w32 : Write a 32-bits data into device memory : Start address of download <32-bit_data> : 32-bit data to be downloaded values should be separated by space -w16 : Write a 16-bits data into device memory : Start address of download <16-bit_data> : 16-bit data to be downloaded values should be separated by space -w8 : Write a 8-bits data into device memory : Start address of download <8-bit_data> : 8-bit data to be downloaded values should be separated by space -v, --verify : Verify if the programming operation is achieved successfully -nv, --noverify : Do not verify if the programming operation is achieved successfully, used with -w32/-w16/-w8 commands -checksum, --checksum : Memory checksum calculation : Optional, Start address : Optional, Size of memory region : If the parameters and are not indicated, the tool will calculate the full internal Flash -r32 : Read a 32-bit data from device memory : Read start address : Size of data -r16 : Read a 16-bit data from device memory : Read start address : Size of data -r8 : Read a 8-bit data from device memory : Read start address : Size of data -rst : Reset system -hardRst : Hardware reset Available only with JTAG/SWD debug port -halt : Halt core -run : Run core -step : Step core Available only with JTAG/SWD debug port -score : Get core status Available only with JTAG/SWD debug port -coreReg : Read/Write core registers [<core_register>] R0/../R15/PC/LR/PSP/MSP/XPSR/APSR/IPSR/EPSR/ PRIMASK/BASEPRI/FAULTMASK/CONTROL [core_reg=] value in case of write opration Note: multiple registers can be handled at once Available only with JTAG/SWD debug port -r, --read -u, --upload : Upload the device memory content to a .bin/.hex/.srec/.s19 file : Start address of read and upload : Size of memory content to be read <file_path> : file path with .bin/.hex/.srec/.s19 extension -el, --extload : Select a custom external memory-loader for JTAG/SWD -rdu, --readunprotect: Remove memory's Read Protection by shifting the RDP level from level 1 to level 0. -tzenreg, --tzenregression: Remove TrustZone Protection by disabling the TZEN -ob, --optionbytes : This command allows the user to manipulate the device -force_no_da, --force_no_da -w32dbgmcu : Write a 32-bits data into DBGMCU DBG AUTH HOST register -lockRDP1 : Lock RDP level 1 -wsigfoxc : Write the Sigfox credential, -fillmemory : Fill memory with the given pattern from the chosen address. Beta commands: -regdump : Read and dump Core and MCU registers -pwr, --power : Perform power ON/OFF, only for STLINK supporting this capability -c, --connect : Establish connection to the device
-detach : Send detach command to DFU -wb : Write blob
-pmic : Program PMIC NVM
-gc, --getcertificate : Get the chip Certificate, -p, --phaseID : Display the current partition ID to be loaded -w, --write -ssp, --ssp : Program an SSP file OTP structure v1 commands : -otp program : This command allows the user to program SAFMEM -otp fwrite : This command allows to program a binary file OTP structure v2 commands : -otp write : This command allows to fuse or update OTP words -otp lock : This command allows to fuse permanently OTP words -otp fwrite : This command allows to program a binary file MCU Secure programming specific commands: -installipmodule, --installipmodule : Install ip module file -updateipmodule, --updateipmodule : update ip module. <file_path> : Path of SMU file containing the update. [] : Destination address of the smu module -sfi, --sfi : Program an sfi file [<protocol=Ptype>] : Protocol type to be used : static/live Only static protocol is supported so far Default value static <file_path> : Path of sfi file to be programmed [hsm=0|1] : Set user option for HSM use value in {0 (do not use HSM), 1 (use HSM)} Default value : hsm=0 <lic_path|slot=slotID> : Path to the SFI license file (if hsm=0) or reader slot ID if HSM is used (hsm=1) [<licMod_path>|slot=slotID]: list of the integrated SMI license files paths if HSM is not used (hsm=0) Or readers slot IDs list if HSM is used (hsm=1) Used only in combined case the list order should correspond to modules integration order within the SFI file -ssfi, --ssfi : Program an ssfi file -smi, --smi : Program an smi file needed only for relocatable SMI <lic_path|slot=slotID> : Path to the SMI license file (if hsm=0) or reader slot ID if HSM is used (hsm=1) -rsse, --rsse : Set the RSSe file path, -mcsv, --mcsv : Set the MCSV file path indicating SFI's modules configuration -a, --abort : This command allows the user -dsecurity : Disable the security for STM32WL -setdefaultob : Set default Option Bytes for STM32WL -rssgetversion, --rssgetversion : get the version of RSS -hsmgetlicensefromcertifbin, -hsmglfcb : Get a license for the input certificate STM32WBxx specific commands: -getuid64 : Read the device UID [firstinstall=0|1] : 1 if it is a first install otherwise 0 optional, Default value: firstinstall=0 [startstack=0|1] : 1 to start the stack after the upgrade otherwise 0 optional, Default value: startstack=1 -v : Verify if the download operation is achieved successfully before starting upgrade -startwirelessstack : Start the wireless stack Key management commands: -authkeyupdate : Authentication key update <file_path> : New authentication key file path. : This is the public key generated by : STM32TrustedPackageCreator using -sign command. -authkeylock : Authentication key lock : Once locked, it's no longuer possible to change it : using authkeyupdate command -wusrkey : Write user key <file_path> : User key file path <keytype=1|2|3> : User key type, values : 1, 2 or 3. : 1 = simple key, 2 = master key, 3 = encrypted key. Serial Wire Viewer specific commands: -swv : Printf via SWO -script : Start the execution of Script File -sdp : Start the OBKey Provisioning -pwd : Start Provisioning with password
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Sorry, here the help file |
Beta Was this translation helpful? Give feedback.
All reactions
-
and last finally I need to do this: ${STM32CP_CLI} -c port=${PORT} rts=low dtr=low (I need a wait time for the board to come in boot mode driving by RTS signal) |
Beta Was this translation helpful? Give feedback.
and last finally I need to do this:
${STM32CP_CLI} -c port=${PORT} rts=low dtr=low
sleep 1
${STM32CP_CLI} -c port=${PORT} rts=low dtr=low ${MODE} ${ERASE:+"-e all"} -q -d "${FILEPATH}" "${ADDRESS}" -s "${ADDRESS}" "${OPTS}"
(I need a wait time for the board to come in boot mode driving by RTS signal)