2024-06-18 09:01 PM - edited 2024-06-18 09:09 PM
i am using stm3210e-eval board which has stm32f103zgt6 mcu and i trying to send data on its uart but i am not able to receive any. i am trying to receiving it through blocking mode
uint8_t rx[10];
HAL_UART_Receive(&huart2,rx,1,HAL_MAX_DELAY);
HAL_Delay(1000);
now this is the code and i have put the breakpoint on HAL_Delay so that as soon as data is received it will next stop on HAL_Delay but it does not break it stays stuck into uart function there and is not data getting received. I am using FL232RL to send data from putty to mcu pins of uart i can ensure that data is being sent from putty because when i hit enter onto putty i can see the green led getting blinked with each send of data but i am not getting anything over there but i can send data from mcu to putty i can see that clearly so what is happening
PS: i have double checked the baud rate it correctly set and the uart is transmit and receive mode i have tried changing it to receive mode only but that doesn't help
image of putty configuration for sending the data
Solved! Go to Solution.
2024-08-21 09:38 PM
actually the problem was something else. in CubeIDE we can directly select the board and it loads all the pre configuration and i believed it to be configured right but it wasn't apparently the Rx pin wasn't set in any mode. I set it to input mode and then put the pin in pull down mode and el voila I got it.
2024-06-19 02:24 AM
@rahul7515 wrote:i am using stm3210e-eval board
So the same as here:
@rahul7515 wrote:. I am using FL232RL to send data from putty to mcu pins of uart
As noted in that previous thread, the stm3210e-eval board has RS232 Transceivers connected to the MCU's UART pins:
So you'll need to disconnect those before connecting your FL232RL ...
2024-06-19 02:40 AM
well i cannot just disconnect those because they are on board and soldered and i am not sending the data onto rs232 pin but the actual MCU pins given as header PA2 and 3 or PA9,10
2024-06-19 02:44 AM - edited 2024-06-19 02:46 AM
Are there not any links or solder bridges to disconnect them?
You can't just connect the FL232RL output - because it will be shorted to the ST3232C output!
Or just get yourself a USB-to-RS232 converter, and connect to the DE9
EDIT:
Or use a Nucleo-F103RB instead ?
https://www.st.com/en/evaluation-tools/nucleo-f103rb.html
2024-06-19 02:54 AM - edited 2024-06-19 02:55 AM
@Andrew Neil wrote:Are there not any links or solder bridges to disconnect them?
Yes, there are zero-ohm links on every output from the ST3232C chips to the MCU input pins:
2024-06-19 03:35 AM
well i can't just desolder those miniature smd resistors
2024-06-19 03:37 AM
changing the board is no solution and besides even if it is connected to its out why does that matter i am directly giving my input their it should directly go to the mcu
2024-06-19 03:39 AM - edited 2024-06-19 04:01 AM
@rahul7515 wrote:i can't just desolder those miniature smd resistors
Of course you can - that's exactly why they're there!
All you need is to break the connection - you don't need to be careful about not damaging the "resistors".
Alternatively, again, get yourself a USB-to-RS232 converter (or two; or a double), and connect to the DE9(s):
2024-06-19 03:59 AM - edited 2024-07-04 02:10 AM
@rahul7515 wrote:even if it is connected to its out why does that matter
Think about it:
If the ST3232C output is giving a '1', and your FL232RL output tries to give a '0' you are shorting the '1' and '0' together - that's not going to work!
Similarly, If the ST3232C output is giving a '0', and your FL232RL output tries to give a '1' you are again shorting a '1' and '0' together - that's not going to work!
It's a general principle of electronics that you can't just* wire two outputs together.
It's fine to have one output driving two (or more) inputs (so long as you don't overload the output) - that's why the transmit from your MCU works.
* there are special cases of outputs specifically designed for this - but you can't just do it without "special measures"
#ShortingOutputs
2024-06-19 04:21 AM - edited 2024-06-19 04:28 AM
Hello @rahul7515 ,
As stated by @Andrew Neil there is a short circuit between RS232 transceiver output going to UART_Rx and your FL232RL bridge output!
It's a very basic concept in digital electronics: don't connect two outputs directly together. For that either ORing the outputs or using open-drain config which is not possible in your case.
So you don't have any solution than disconnecting ST3232C by removing the adequate 0 ohm resistors.