2017-03-03 07:48 AM
Hi all,
I am trying to enable UART1 on stm32l151RBXA controller. I am using code generated by Cube. I tried modifying the code but serial port just does not work. I am only trying to send text to serial port but this is not happening. When I debug using ST Link, I don't see the program getting stuck, but no data is output through Tx pin (PORTA pin 9). Will post the code if needed. Kindly help resolve this issue as I have spent many days trying to figure out the problem. Thank you.
#stm32l151-uart2017-03-03 07:59 AM
Hi
Nayani.Partha
,I advice you to look at the 'UART' examples provided by ST when downloading the
package.The 'UART' examples could be found under the paths below:
STM32Cube_FW_L1_V1.6.0\Projects\STM32L152RE-Nucleo\Examples\UART
or
STM32Cube_FW_L1_V1.6.0\Projects\STM32L152D_EVAL\Examples\UART
You may take those examples as a reference to correctly configure your UART peripheral.
Khouloud
2017-03-03 08:04 AM
To what exactly do you have it connected? Remember the UART outputs at CMOS levels, and not those used by RS232.
Output a continuous stream of 'U' characters, and use a scope to view the signal. Confirm the bit rate matches expectations.
2017-03-09 08:46 AM
Hi Clive One,
Thank you for your time and sorry for replying so late. I have level shifted UART pins (max3232). The issue was that of getting used to new types of functions from ST MCD. I was using CooCox and this controller registers are not defined properly. I switched to Atollic TrueStudio and MXCube. If you notice the functions and their nomenclature in the newer version of the libraries, they are totally different. Finally I got the port working. Thanks once again.
Parmin
2018-07-12 07:25 AM
Hello,
I have the same problem, so if someone has any clue to help...
Thx