Re: STM32F103 Bluepill UART problem
Posted: Mon Mar 09, 2020 12:37 pm
i took a look at rm0008 STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx andSTM32F107xx advanced ArmĀ®-based 32-bit MCUs
https://www.st.com/content/ccc/resource ... 171190.pdf
in the uart section:
as the stm32 uart can handle 8 or 9 bits word lengths, and it can turn on / off parity
i'd like to suggest reading the USART_CR1 register (check rm0008 for the bits definition)
you could probably print out the value & check against the specs in the manual. if the values are not what you are expecting against the line discipline (e.g. 8N1) settings, it probably points to a software issue. but if the settings are correct, then possibly it may be a hardware issue
you could probably find in the header files for the base and register definition (e.g. ((USART_TypeDef *) USART1_BASE)->CR1 ). i'm not sure if it is correct, you'd need to check in the headers and test it out. and perhaps print that out to examine it
for that matter, i've occasionally patched the values in the register to my preferred settings directly, but if you diagnosed a s/w bug, do point it out here or even log a issue in the github core as well.
hope this helps
https://www.st.com/content/ccc/resource ... 171190.pdf
in the uart section:
as the stm32 uart can handle 8 or 9 bits word lengths, and it can turn on / off parity
i'd like to suggest reading the USART_CR1 register (check rm0008 for the bits definition)
you could probably print out the value & check against the specs in the manual. if the values are not what you are expecting against the line discipline (e.g. 8N1) settings, it probably points to a software issue. but if the settings are correct, then possibly it may be a hardware issue
you could probably find in the header files for the base and register definition (e.g. ((USART_TypeDef *) USART1_BASE)->CR1 ). i'm not sure if it is correct, you'd need to check in the headers and test it out. and perhaps print that out to examine it
for that matter, i've occasionally patched the values in the register to my preferred settings directly, but if you diagnosed a s/w bug, do point it out here or even log a issue in the github core as well.
hope this helps