2015-01-21 12:55 AM
HI ALL
I have written a code for USART communication full duplex between stm32f407 and stm32f030 and it is working fine as soon as power on reset. The half duplex communication also working fine between two stm32f030 as soon as the power on reset. BUT IF i connected the three together The logic is f407 sends some cmd to 1st f030 through full duplex usart, after receiving that the 1st f030 send that data to 2nd f030 , the 2nd f030 processed the receives data and send back the process cmp ack to 1st f030 and 1st f030 sends the same ack to f407...and the loop continues..... The issue is ,it doesn't happen in power on reset It happens after presseing the reset button of f407 (as f407 is master) for 8 times , always 8 times after that everything works fine but not in the 1st power on reset. I have debugged and I have seen that there is a frame error in the 2nd f030 when the first packet is received. after 8 times reset packet is received fine(ther is no frame error) I have checked sending the received data of the 2nd f030 to the hyper terminal through the other USART.... Why it is working fine after 8 times reset but not in the first time....Can anybody face this issue. Please help2015-01-21 09:53 PM
Any body can help
2015-01-21 11:26 PM
Very little information but it seems like a synchronization issue between chips.
You should consider that the chips will not boot exactly at the same time and each of them may catch some of the incoming messages in the middle. You should pay more attention in designing the protocol and making it more robust: - providing some handshake in the communication - repeating messages with some timeout if response doesn't come - identifying and cleaning wrong messages - ability to resynchronize to a correct message2015-01-22 01:37 AM
Thanks for your suggestion Do I need a timer which should start after transmitting is complete and then if I dont received ACK then send the data again...If that so f030(1)am sending 5 byte data to the f030(2) chip at a baud rate of 9600 and if it is received f030(2) sends an ACK SO I am starting the timer in f030(1) after 5 byte transmission . ACK is also 5 byte so therefore I should program timer for how much rime....the baud rate is 9600 in both the cases....Please suggest as I know f030(2) receives the packet which is framed error .
2015-01-22 01:48 AM
2015-01-22 02:18 AM
[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/stm32f030%20usrt%20surprissing%20issue&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=46]Prior thread on robustness topic
2015-01-22 05:41 AM
2015-01-22 09:12 AM
Half duplex systems are likely to show line noise as direction is changed. Got some pull-up on the line?
Going to suggest you think a bit about your protocol, and how you can make it robust and capable of resynching, rather than expecting fixed byte transactions. Create a simple system to validate the USART communications, and used debug your system.2015-01-22 09:48 PM
The half duplex between two f030 works fine after one reset itself and it doesn't stop. the issue comes when f407 is introduced....The logic I have explain in my first querry. I have pulled up in my software does it required to do in hardware also. please suggest
2015-01-23 10:17 PM
please suggest Do I need