2015-01-12 10:05 AM
I have written two pieces of code for usart half duplex for the two f030 evaluation board respectively
The code workss as followsIn the first piece of code (named as board 1) the usart1 sendinng the data waitinng for the tc bit to sset an ddisable the traansmiitter and enablinng as receivver....waiting for the data from the board 2 to received when received interrupt happenss and again transmittinng the data and the loop continues...In the second piece of code (named as seconnd board) waiting for the data in the while for the data to be received .after recceivving senddingg the data to thee firsst board and the loop ccontinnuuesHalf duplex works fine n number of times ....the problem is but if I swap the code if I make the board 2 to board 1 andd board 1 to 2 it doessnn't work....the sscenerio is board2 now (first piece of code practically saying now board 1) sends the data but board1 now(second piece of code practically saying board 2 doesn't sendds any ack. I have debug the board 1 now board 2 it always goess to aa received interrupt even board 1 is not connnected....whaat may be the issue...I am us ing PB6 in both the cases remember I am doing hhalf dupplexNote ...I m havinng diifferent workksspace for ddifferent codes. What may be the issue ...Please help2015-01-12 09:52 PM
PLease any body give suggestion
2015-01-13 05:51 AM
Trying to decide if you're typing on a phone, or drunk....
These types of problems are really hard to debug without hardware or software. You're going to want to carefully analyze your software, and attach to a scope or logic analyzer to the signal and get a clear understanding of what is going on over the wire, and any timing differences/requirements.2015-01-13 09:34 AM
ha ha ...I typed bit fast so double words....
Yes it was a timing issue...I solved it.... I am communicating stm32f407 with one f030 as usart full duplex and this f030 communicates with other f030 as usart halfduplex.... 407 and f030 working fine as full duplex and f030 is working fine with other f030 as half duplex. but all three together runs for some time and then stops....I am powering on the three at onne time. how to debug it as all are mounted in same pcb .....I am really not able to undderstand it.Any suggestion2015-01-13 09:48 AM
Well you're going to want a strong and robust communication protocol with the half-duplex nodes so they don't interfere or talk over each other, and can resynchronize themselves if the link gets garbled at some point. You'd want to test your code, and output telemetry so you can understand what it's doing, and why it might have stopped.
2015-01-13 10:00 AM
I didn''t understand can you explain by an example ...what I think is three are not getting cordinate wih each other ..after pressing three to four times reset then it works for sometimes....tming issue may be a problem?
2015-01-13 10:55 AM
I didn''t understand can you explain by an example ...what I think is three are not getting cordinate wih each other ..after pressing three to four times reset then it works for sometimes....tming issue may be a problem?
No I really don't have the resources to work on your project. Sounds like a ''robustness'' issue. You should design your protocol so it can work when things do not start and operate perfectly. This means error handling, and recovery, designed in rather than assuming everything works, and crashing when it doesn't. This might mean you have to bring up the nodes in a controlled and ordered fashion.