hello is there anyone who is expert with LIN protocol ?? i have some struggles in how to send the sys break over UART (its 13bit in addition to 1 bit for delimiter)
like if i have the following LIN frame: Break+Syns(0x55)+PID(0x78)+Data1(0x01)+Data2(0x00)+checksum(0x86);
and i initialize a byte array to send this packet over uart
x={break(value),0x55,0x78,0x01,0x00,0x86};
beso_12 said:how to send the sys break over UART (its 13bit in addition to 1 bit for delimiter)
how to send the sys break over UART (its 13bit in addition to 1 bit for delimiter)
That will be defined by the hardware of the particular chip you're using - nothing to do with Keil.
Some chips have a facility in the UART to generate a BREAK - see the datasheet for details.
If the UART can't do it itself, you will have to do it "manually" by forcing the pin state. Again, how to do that depends on the chip in question - nothing to do with Keil.
beso_12 said:and i initialize a byte array to send this packet over uart x={break(value),0x55,0x78,0x01,0x00,0x86};
A BREAK is not a data value - it is a deliberate violation of the normal framing.
https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter#Break_condition
hello Andy Neil , thanks for your kindness
you mentioned If the UART can't do the break i need to do it "manually" by forcing the pin state . how???
You set the line to the required state, for the required time.
Have you done a basic "Blinky" project ?
yes i had
So it's exactly the same: you're setting a line high & low with a certain timing - so that the LED blinks on & off ...