2021-12-20 07:51 AM
Hello,
I'm currently working with a board made by my team using a STM32L476RG. I started my project from the dataLog Fusion Project from the Mems examples. My issue is that the UnicleoGui communicates with the mcu through STLink by using USART2, connected to the ports PA2 and PA3.
However those ports weren't routed and now I have to solder by hand my STLink UART Ports to the MCU pins. By chance, my team routed the port PA9 and PA10 in order to have uart access to the board, in bootstrap mode to program it.
With my handmade soldering i can communicate with the ST link but when the device will be manufactured, we will have to test some outputs of our device ( the heading output from motionFX for example ), and we would like to be able to do so through our connector, routed to pA9 and PA10. (those ports would the be connected to the STLink device, but without needing any soldering)
So my question is : Is it possible to connect my PA9 and PA10 ports to USART2, which doesn't allow those ports from the STM32 Cube IDE GUI?
If no, is it possible to cleanely connect PA2 and 3 to 9 and 10 using software? and in that case can i prevent the 2 and 3 ports from outputing any signal?
Finally, if it is also not possible, is it possible to configure PA9 and 10 to work the same as PA2 and 3 did with this project? I tried this option, however it seems there are a lot of parameters to change, beside the ones from the .ioc file...
Many thanks for the help you could provide,
Matthieu
Solved! Go to Solution.
2021-12-20 08:36 AM
> So my question is : Is it possible to connect my PA9 and PA10 ports to USART2, which doesn't allow those ports from the STM32 Cube IDE GUI?
No.
> If no, is it possible to cleanely connect PA2 and 3 to 9 and 10 using software? and in that case can i prevent the 2 and 3 ports from outputing any signal?
Also no.
You can't make hardware connections to the internals on pins where those connections don't exist.
> Finally, if it is also not possible, is it possible to configure PA9 and 10 to work the same as PA2 and 3 did with this project?
PA9/PA10 is connection to USART1, so you could use that instead of USART2. Should be straightforward to modify your code to use USART2 instead of USART1.
2021-12-20 08:36 AM
> So my question is : Is it possible to connect my PA9 and PA10 ports to USART2, which doesn't allow those ports from the STM32 Cube IDE GUI?
No.
> If no, is it possible to cleanely connect PA2 and 3 to 9 and 10 using software? and in that case can i prevent the 2 and 3 ports from outputing any signal?
Also no.
You can't make hardware connections to the internals on pins where those connections don't exist.
> Finally, if it is also not possible, is it possible to configure PA9 and 10 to work the same as PA2 and 3 did with this project?
PA9/PA10 is connection to USART1, so you could use that instead of USART2. Should be straightforward to modify your code to use USART2 instead of USART1.
2021-12-21 01:08 AM
Thank you for your answer. I indeed found what was missing, In the .ioc file i had to change in the Software pack section the BSP Usart to usart1. Seems like the code generated indeed inverted USART 2 with USART1.
However i'm still unable to get the Unicleo GUI to detect the board (or the ST link can't communicate with it) so i may have missed something. Maybe the fact that the PA2 and PA3 are still connected to the ST LINK RX-TX ports have a play in this. I see them in reset Mode so that may be my issue, i'll let you know.
2021-12-21 01:52 AM
Ok so after trying to use the new software with a STM32 nucleo board, the modification seems to work, but i can get it to work on our cutom board so something must be off with the routing.
Many thanks for your answer
[Edit] There is indeed something wrong with hardware, PA9 and 10 aren't directly routed to the connextor, there is an RS232 converter between those 2 parts.
2021-12-21 05:44 AM
Glad you got it working.
You can mark a post as answered by going to the reply which helped the most and clicking "Select as Best".