UART Start of Transfer Problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART Start of Transfer Problem

1,762件の閲覧回数
Briwal
Contributor I

I'm connecting to a J1708 serial network with the K40X256. One of the requirements of the J1708 spec is that a transfer must start within a half bit time of when it is programmed (this is necessary to detect collisions with other devices that start the transfer at the same time). J1708 runs at 9600 baud, so a half bit time is 51us. So after programming the UART data register the transfer needs to start within 51 us.

 

When I program the UART data register the transfer starts anywhere from 51 to 150 (0.5 to 1.5 bit time). Is there a signal that I can synchronize the writing of the data register so I can guarantee that the transfer will start in a half bit time?

 

 

0 件の賞賛
返信
2 返答(返信)

1,350件の閲覧回数
Briwal
Contributor I

Update.

So I have been able to create a flex timer with a frequency the same as the baud rate. I sync the timer to when I enable the Transmitter.  This makes is so there isn't a variation on when the transfer starts. It is still not within one bit time but it is close (0.6*bit time).

 

0 件の賞賛
返信

1,350件の閲覧回数
jrsimma
Contributor I

Briwal:

 

I'm impressed with your understanding about section 5.2.2.1 of J1708.  Many folks just overlook it, but to their peril.  I know of several companies that had recalls or software updates due to lack of compliance.

 

In regards to your question, we've had a similar problem with Freescale parts.  I think you will need to do a software UART to comply with 5.2.2.1.  We do sell a single chip solution that has 2 J1939 ports and a single J1587/J1708 port.  Our 5.2.2.1 max latency is 2 microseconds.

 

Thanks,

 

JR

J1939 to RS-232

J1939 to USB

J1939 to WiFi

J1939 to UART

0 件の賞賛
返信