cancel
Showing results for 
Search instead for 
Did you mean: 

Workbench connection failed

qqwq.1
Associate II

Hi all.

 

Today our custom design board just arrive and we begin to test. Our custom board controllinng via STM32F103RBT6 product and programmed through the Stlink programmer using Stlink Utility software. We have a problem about connection using COM port with pc.

The issue is we cannot connect pc to 103rb chip using CP2102 (usb-ttl) converter module. After a few different module replacement we decided to attach oscilloscope to the RX and Tx pins of the MCU. After that we saw the usb-ttl module send 4 different byte to the 103RB , but 103RB doesnt respond any of this commands when we click to connect button on the workbench>monitor  tool. This seems wrong because all parts are soldered by pcb company and we also check the track of this signal. Also we tried couple of times with different generated codes but all acted same. So i decided to ask the reason behind of this.

I will attach all code files including some oscilloscope screen shots and part of the circuit diagram. Motor parameters and current sensing parameters are not configuret yet because we havent gone so far to test the movement.

 

Many thanks.

3 REPLIES 3
qqwq.1
Associate II

Hi,

I m still facing with this problem. Unfortunately i dont have any eval board currently because of my team and i splitted so i cannot access any eval board right now and i alreaddy ordered a new one but it seems it will take at least two weeks to delivery of shipment cargo.

Can anyone please take a look at the code generated by mcsdk and tell me if you can see any error or problem at all ? The code generated by mcsdk and doesnt added any external code on it. After i splitted from my teamwork ,  i rebooted and updated my pc to win8 and then i managed to get mcsdk output without any error massages. So, there musnt be any issue but it seems there are. I especially checked lots of time hardware side of work and it is ok . I have also uploaded oscilloscope outputs of following uart tx signals , you can check that inside .rar file. I spend lots of time to work with this thing but no luck.  My pc send tx signal over uart but no response from mcu side.

 

Hopefully you can help me with that.

Thanks again.

Hello @qqwq.1 

In order to debug your issue, I would advise you to check whether the UART is configured in the same way on both ends, STM32 and Workbench monitor. Particularly the baud rate must be equal.

Once done, I would check the data are well received by the STM32. To do that, one idea is to set a break point in the 

USART_IRQHandler function from the file stm32f10x_mc_it.c. the STM32 must stopped as soon as you click on the connect button and the PC starts sending data. If the execution does not stop when you start sending data, but you checked that the PC11 (USART3_RX) is toggling, then pause the debugger and check where your code is.
 
Indeed, if your UART connection is Ok, and the UART is correctly configured, then the last option is that the software is looping inside a higher priority interrupt, without letting the chance to serve the UART interrupt.
 
To check this point, set the UART interrupt to the top priority (0) and decrease others to guarantee that it is the only one at 0. From my past experience, it is probably due to a bad configuration of the timer break that detects an incorrect overcurrent. Once you identified your issue, do not forget to set back the interrupt as they were initially set.
Let us know if it helps.
Cedric
 
 

Hi @cedric H 

Thank you so much. I will try this at the weekend and will let you know after that.