| 数据搜索系统,热门电子元器件搜索 |
|
MAX17841BGUE 数据表(PDF) 17 Page - Maxim Integrated Products |
|
|
|||||||||||||||||||||||||||||
MAX17841BGUE 数据表(HTML) 17 Page - Maxim Integrated Products |
|
17 / 33 page ![]() Clearing the Receive Buffer DuringUARTinitialization,itisrecommendedthatthehost clearthereceivebufferbyissuingtheCLR_RX_BUFSPI transaction(E0h).Thisresetsthereceivebufferasfollows: ● RX_RD_Pointer:00h ● RX_WR_Pointer:01h ● RX_NXT_MSG_POINTER:00h ● Datainreceivebuffer(62bytes)isclearedto00h If the receive buffer is cleared during Transmit Preambles mode, the state of the buffer cannot be guaranteed. Therefore, after disabling the Transmit Preambles mode, the host should wait until all transmitted preambles have been received before clearing the buffer. Since the first keep-alive stop character received after the last preamble results in a null message, the host can simply wait until the buffer is no longer empty (RX_Empty_Status = 0) before clearing the buffer. The RX Clear Buffer command acts an an asynchronous reset not only for the RX Buffer, but also for the UART receiver logic. When the UART receiver logic is reset, it must resynchronize to the incoming UART signal before bytes can be properly processed. This is accomplished by receiving either a preamble byte or an idle state lasting at least one UART byte period. The preamble used to resynchronize the data stream should not be the same preamble that is at the beginning of the next transmitted message. The application should make sure that one of these conditions is met following an RX buffer clear prior to sending the next message from the MAX17841B. Receiving Messages UART messages are framed with the preamble and stop characters. If the UART receiver decodes a valid pream- ble, it prepares to receive a message but it does not store thepreambleinthereceivebuffer.Oncedataisreceived, thebufferisnolongerempty(RX_Empty_Status=0)and the UART sequentially stores decoded data bytes in the receive buffer until either a stop character or another pre- amble is received. When the stop character is received at the end of a message, the UART stores it in the receive bufferasanullbyte(00h)andsetstheRX_Stop_Status bit. The RX_Stop_Status bit is subsequently cleared when all unread messages have been read (buffer empty) or the next preamble is detected. The host can set the RX_Stop_INT_Enablebitandmonitortheinterruptlineto determine when to service the receive buffer. When the host services the receive buffer, three bits in the RX_Byte register indicate specific information about the bytebeingread(thebyteaddressedbyRX_RD_Pointer), which is useful for error checking: ● First_Bytebit:Indicatesthatthebyteisthefirstdata byte in a message (the corresponding character was preceded by preamble character). ● Byte_Error bit: Indicates that the byte may contain an error (the corresponding character contained a Manchester and/or parity error). This bit drives the RX_Errorinterrupt. ● Last_Bytebit:Indicatesthatthebyteisthelastbytein a message (the corresponding character was a stop character and was stored as a null byte). Message Exceptions If a message is not framed with a valid preamble, then the UART ignores the data and does not store it. If a message is not framed with a stop character, then the preamble of the next message serves to delineate betweenthetwomessages.However,thefirstmessage has no stop character stored. If the UART receives a preamble followed by a stop character it stores a null message in the receive buffer consisting of a single null byte (00h). This occurs when a keep-alive stop character is received after Transmit Preambles mode is disabled. In this use case, the receive Figure 12. Receive Buffer Memory Map RECEIVE BUFFER MEMORY MAP EACH MESSAGE IS VARIABLE LENGTH AVAILABLE (EMPTY) FIRST BYTE OF MESSAGE 2 DATA TO HOST RX_RD_POINTER RX_NXT_MESSAGE RX_WR_POINTER FIRST BYTE OF MESSAGE 3 DATA FROM UART AVAILABLE (EMPTY) 1 1 1 1 1 0 0 0 0 0 0 0 MESSAGE 1 (ALREADY READ) 8 BITS MESSAGE 2 (BEING READ) PART OF MESSAGE 3 (BEING LOADED BY UART) Maxim Integrated │ 17 MAX17841B Automotive SPI Communication Interface (ASCI) www.maximintegrated.com |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |