Abstract: Described herein is a CAN controller (400) for transmitting and receiving CAN message data via CAN bus (200). Based on the data to be transmitted, the CAN controller (400) calculates data length of the CAN message data and number of frames. Further, the data is fragmented and sequenced into different CAN frames when size of the CAN message data is more than 7 bytes. Each CAN frame has a data field and a sequence number field. The CAN controller (400) transmits the generated number of CAN data frames to the CAN bus (200).
TECHNICAL FIELD
[0001] The present disclosure relates, in general, to Controller Area Network (CAN) controller for communication in vehicle. In particular, the present disclosure relates to a CAN controller and a method for transmitting and receiving data frame in a CAN protocol. More particularly, fragmenting and transmitting fragment data over CAN node to another CAN nodes and receiving fragmenting data and reconstituting the original data.
BACKGROUND
[0002] Background description includes information that may be useful in understanding the present subject matter. It is not an admission that any of the information provided herein is prior art or relevant to the presently claimed subject matter, or that any publication specifically or implicitly referenced is prior art.
[0003] CAN protocol can be defined as the set of rules for transmitting and receiving messages in a network of electronic devices. It was designed specifically looking into the needs of the automobile industry. CAN protocol is a method of communication between various electronic devices like engine management systems, active suspension, ABS, gear control, lighting control, air conditioning, airbags, central locking, infotainment system, etc., embedded in an automobile. CAN provide a mechanism which is incorporated in the hardware and the software by which different Electronic Control Units (ECUs) can communicate with each other using a common cable, i.e., twisting-pair cables supporting half-duplex protocol and a Carrier Sense Multiple Access/Collision Detection with Arbitration on Message Priority (CSMA/CD+AMP) protocol.
CAN secures high reliability, such as high noise immunity, error detection, and error collection.
[0004] In CAN protocol, every nodes have the access to read and write data on the CAN bus. When the node is ready to send data, it checks availability of the bus and writes a CAN frame onto the network. A frame is defined structure, carrying meaningful sequence of bit or bytes of data within the network. CAN transmitted frame does have address neither of transmitting node or the receiving node. CAN is a message based protocol. A message can be defined as a packet of data which carries information. The data is organized in a specific structure called frame and the information carried in every byte is defined in the CAN protocol. Protocols are generally of two types: address based and message based. In an address based protocol the data packets contain the address of the destination device for which the message is intended. In a message based protocol every message is identified by a predefined unique ID rather than the destination addresses. All nodes connected with the CAN bus to receive the CAN frame and depending on ID on the node decides whether to accept it or not. If multiple nodes send the message at the same time than the node with highest priority (lowest arbitration ID) gets the bus access. Lower priority nodes wait till the bus is available.
[0005] Fig. la and Fig. lb illustrates data frame of the CAN protocols. Fig. la illustrates CAN frame with 11 bit identified fields which is called as standard CAN data frame and Fig. lb illustrates 29 bits identifier field which is called as extended frame. A message is packet of data that carries the information to be exchanged between the nodes. Each message in CAN has a unique identification number. The identification number is specified according to the content of the message and stored in message identifier. This identification number is also unique within the network so when the transmitting node places the data on the network for access to all nodes, each node checks unique ID number to allow the related message to pass through the filter and rest of the messages are ignored. This is done to save the time spent on sorting. With message based protocol other
nodes can be added without re-programming since the units connected to the bus have no identifying information like node addressing. So there is no change needed in the software and hardware of any of the units connected on the bus.
[0006] Further, CAN define the logic '0' as dominant bit and logic '1' as recessive bit.
[0007] Referring to Fig. la and Fig. lb, a Start-Of-Frame (SOF) field indicates start of message and used to synchronize the nodes on a bus. A dominant bit '0' in the field marks the start of frame.
[0008] 11 bit IDENTIFIER field serves dual purpose one, to determine which node has access to the bus and second to identify the type of message. A Remote Transmission Request (RTR) bit having a default value of '0'. When the RTR bit value is '0', a CAN message is a data frame. When the RTR bit value is '1', the CAN message means Remote Transmission Request (RTR). That is, the RTR bit value of' 1' means that the CAN message is not a data frame but a remote frame.
[0009] Identifier Extension (IDE). It is used to specify the frame format. Dominant bit is for standard frame and recessive for extended frame.
[0010] R0 and Rl - Reversed bits. Not used currently and kept for future use.
[0011] DLC - Data Length Code. It is 4 bit data length code that contains the number of bytes being transmitted.
[0012] DATA- Used to store up to 64 data bits of application data to be transmitted.
[0013] CRC- Cyclic Redundancy Check. The 16-bit (15 bits plus delimiter) cyclic redundancy check (CRC) contains the checksum of the preceding application data for error detection.
[0014] ACK - Acknowledge (ACK) field. It compromises of the ACK slot and the ACK delimiter. When the data is received correctly the recessive bit in ACK slot is overwritten as dominant bit by the receiver.
[0015] EOF- End of Frame (EOF). The 7-bit field marks the end of a CAN frame (message) and disables Bit - stuffing, indicating a stuffing error when dominant.
[0016] IFS - Inter Frame Space that specifies minimum number of bits separating consecutive messages. It provides the intermission between two frames and consists of three recessive bits known as intermission bits. This time allows nodes for internal processing before the start of next frame.
[0017] Still transmission and reception of data more than 8 byte is problem over CAN protocol. There are some existing method and technologies that fragments the data into a plurality of frames and transmit the fragmented data over the CAN bus. However, these existing technologies uses only 1-6 byte of data in place of 8 byte of data where 2 byte of data is used for Message Identifier, a Seq. Number, and a Seq. Delimiter. With the less available portion of data field, i.e., 6 byte in each frame, large data is transmitted with large number of frame which creates handling problem of the data and memory utilization at Node end. Further, in the existing method delimiter is provided at the last frame to indicate end of the frame data. The CAN Node has to keep large portion of memory as vacant to receive un-informed data which causes a problem of memory utilization or RAM memory management at each CAN node.
[0018] Problem of memory utilization exists where heavy data is to be transmitted over the CAN protocol, such as NFC data or infotainment data.
[0019] Accordingly, there is a need for methods for fragmenting large data, i.e., more than 8 bytes into a plurality of data frames with memory utilization and transmitting the plurality of data frames over the CAN bus to the other CAN node, and receiving and reconstituting the fragmented data into original data.
OBJECTS OF THE DISCLOSURE
[0020] Some of the objects of the present disclosure, which at least one embodiment herein satisfy, are listed hereinbelow.
[0021] A general object of the present disclosure is to provide methods and CAN controllers for providing a mechanism that can fragment data more than 8byte into a plurality of frames and transmitting the same over CAN bus to other CAN node.
[0022] An object of the present disclosure is to provide a CAN data frame to transmit data in 7 bytes.
[0023] Another object of the present disclosure is to provide a method for fragmenting the data more than 7 bytes and transmitting the same over to the CAN bus to receiver of corresponding node.
[0024] Another object of the present disclosure is to provide a method for receiving and reconstituting the data based on the frame sequence number.
[0025] These and other objects and advantages of the present invention will be apparent to those skilled in the art after a consideration of the following detailed description taken in conjunction with the accompanying drawings in which a preferred form of the present invention is illustrated.
SUMMARY
[0026] This summary is provided to introduce concepts related to a CAN controller and a method for transmitting and receiving a CAN data frame. The concepts are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
[0027] The present disclosure relates to a CAN controller for transmitting Controller Area Network (CAN) data frames. The CAN controller comprises one
or more processors coupled to a memory and a converter. The converter configured to calculate data length of a CAN message data and number of CAN data frames to be used based on the calculated data length and fragments the CAN message data into data fragments sequentially, when size of the CAN message data is more than 7 bytes. Further, the converter generates a CAN data frame for each of the data fragments based on the calculated data length of the CAN message data. Where each of CAN data frame includes data field and sequence number field; and transmit the generated number of CAN data frames to a CAN bus.
[0028] In an aspect, the sequence number field contains information about sequence number of the CAN data frame from the number of CAN data frames.
[0029] In an aspect, the sequence number field allocated to byte '0' of data field of each of the CAN data frame and the size of data field is defined from byte '1' to byte '7' having fragmented CAN message data.
[0030] In an aspect, the calculated data length is allocated to data length field of first CAN data frame from the number of CAN data frames, the data length field is allocated to byte ' 1'.
[0031] The present subject matter further relates to a CAN controller for receiving Controller Area Network (CAN) data frames and reconstituting the original data from the number of CAN data frames. The CAN controller comprising one or more processors coupled to a memory and a converter. The converter configured to receive a first CAN data frame from the CAN data frames and generate a CAN data structure having information about data length and sequence number, based on the first CAN data frame. The converter set flag 'ON' when sequence number of the CAN data frame is equal to 1 and reliability bit of the CAN data frame is recessive and extract the data fragments of the CAN message data from the CAN data frames until the CAN data length of the extracted CAN message data is equal to or more than the data length defined by the first CAN data frame. Further, the converter reconstitutes the CAN message
data/original data by extracting data fragments from the CAN data structure as per sequence number of the number of CAN data frames.
[0032] The present subject matter further relates to a CAN node for transmitting and receiving a plurality of CAN data frames. The CAN node comprising a CAN transceiver coupled with CAN bus for transmitting and receiving the plurality of CAN data frames and a HOST controller configured to perform functions of the CAN node. Further, the CAN node has a CAN controller coupled with the CAN transceiver and the HOST controller. The CAN controller configure to receive CAN message data from the HOST controller and convert the received CAN message data into the number of CAN data frames based on data length. The CAN controller transfer the number of CAN data frames to the CAN transceiver for communication with the CAN bus.
[0033] In an aspect, the CAN controller configure to calculate data length of a CAN message data and number of CAN data frames based on the calculated data length and fragment the CAN message data into data fragments, when size of the CAN message data is more than 7 bytes. The CAN controller generates a CAN data frame for each of the data fragments including data field and sequence number field, based on the calculated data length of the CAN message data. Further, transmits the generated number of CAN data frames to the CAN transceiver.
[0034] The present subject matter further relates to a method for transmitting a plurality of CAN data frames. The method includes calculating, by a CAN controller, data length of a CAN message data and number of frames based on the calculated data length; and fragmenting, by the CAN controller, the CAN message data into data fragments, when size of the CAN message data is more than 7 bytes. The method further includes generating a CAN data frame for each of the data fragments based on the calculated data length of the CAN message data, each of CAN data frame includes a data field and a sequence number field and transmitting the generated number of CAN data frames to a CAN bus.
[0035] In an aspect, the method includes adding data length of the CAN message data when the sequence number of the CAN data frame is equal to ' 1' and Reliability bit is recessive; transmitting the first CAN data frame with data length and reliability bit; increasing the sequence number by ' 1' and adding the increased sequence number to the CAN data frame at byte '0' until the increased sequence number is less than the calculated number of frames; and transmit the number of CAN data frames with the data fragments until the calculated data length of the CAN message is transmitted.
[0036] In an aspect, the method further includes adding the data fragments to the data field of the CAN data frame, where byte '0' of the data field is allocated to the sequence number and bytes '1 to 7' allocated to the data fragments of the CAN message data.
[0037] In an aspect, the method further include the sequence number field is allocated to byte '0' of data field of the CAN data frame and the data length field is allocated to byte ' 1' of first CAN data frame from the number of CAN data frames.
[0038] The present subject matter further relates to a method for receiving Controller Area Network (CAN) data frames and reconstituting the CAN data frames. The method includes receiving, by a CAN transceiver, a first CAN data frame from number of CAN data frames; generating, by a CAN controller, a CAN data structure having information about data length and sequence number based on the first CAN data frame having information about sequence number and data length; setting flag 'ON' when sequence number of the CAN data frame is equal to ' 1' and reliability bit of the CAN data frame is recessive; extracting, by the CAN controller, data fragments of the CAN message data from the number of CAN data frames until the CAN data length of the extracted data fragments is equal to or more than the data length; and entering, by the CAN controller, the extracted data fragments of the CAN message data into the CAN data structure
and reconstitute the CAN message data by extracting the data fragments from the CAN data structure as per sequence number of the CAN data frames.
[0039] Various objects, features, aspects, and advantages of the inventive subject matter will become more apparent from the following detailed description of preferred embodiments, along with the accompanying drawing figures in which like numerals represent like components.
[0040] It is to be understood that the aspects and embodiments of the disclosure described above may be used in any combination with each other. Several of the aspects and embodiments may be combined to form a further embodiment of the disclosure.
[0041] The foregoing summary is illustrative only and is not intended to be in any way limiting. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features will become apparent by reference to the drawings and the following detailed description.
BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate exemplary embodiments and, together with the description, serve to explain the disclosed principles. In the figures, the left-most digit(s) of a reference number identifies the figure in which the reference number first appears. The same numbers are used throughout the figures to reference like features and components. Some embodiments of system and/or methods in accordance with embodiments of the present subject matter are now described, by way of example only, and with reference to the accompanying figures, in which:
[0043] Fig. la and Fig. lb illustrate exemplary frame structure of CAN protocol, in accordance with an embodiment of the present disclosure;
[0044] FIG. 2 illustrates an CAN bus where a plurality of nodes is connected to the CAN bus and one device is NFC enabled for NFC communication with user device;
[0045] FIG. 3 illustrates architecture of CAN node in CAN network;
[0046] FIG. 4 illustrates structure of CAN controller in CAN network, in accordance with an embodiment of the present subject matter;
[0047] FIG. 5 illustrates a structure of data field in the CAN frame and how data is to be fragmented and stored in the data field of the CAN frame, in accordance with an embodiment of the present disclosure;
[0048] Fig. 6 illustrates a data fragmentation process at Transmission Node in a CAN data Frame transmitting method, in accordance with an embodiment of the present disclosure; and
[0049] Fig. 7 illustrates a data reconstitution process of at receiving Node in a CAN data Frame receiving method, in accordance with an embodiment of the present disclosure.
[0050] It should be appreciated by those skilled in the art that any block diagrams herein represent conceptual views of illustrative systems embodying the principles of the present subject matter. Similarly, it will be appreciated that any flow charts, flow diagrams, state transition diagrams, pseudo code, and the like represent various processes which may be substantially represented in a computer-readable medium and executed by a computer or processor, whether or not such computer or processor is explicitly shown.
DETAILED DESCRIPTION
[0051] The detailed description of various exemplary embodiments of the disclosure is described herein with reference to the accompanying drawings. It should be noted that the embodiments are described herein in such details as to
clearly communicate the disclosure. However, the amount of details provided herein is not intended to limit the anticipated variations of embodiments; on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the scope of the present disclosure as defined by the appended claims.
[0052] It is also to be understood that various arrangements may be devised that, although not explicitly described or shown herein, embody the principles of the present disclosure. Moreover, all statements herein reciting principles, aspects, and embodiments of the present disclosure, as well as specific examples, are intended to encompass equivalents thereof.
[0053] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises", "comprising", "includes" and/or "including," when used herein, specify the presence of stated features, integers, steps, operations, elements and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and/or groups thereof.
[0054] It should also be noted that in some alternative implementations, the functions/acts noted may occur out of the order noted in the figures. For example, two figures shown in succession may, in fact, be executed concurrently or may sometimes be executed in the reverse order, depending upon the functionality/acts involved.
[0055] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which example embodiments belong. It will be further understood that terms, e.g., those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the
context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
[0056] Embodiments and/or implementations described herein relate to methods and CAN nodes for transmitting and receiving fragmented data in CAN protocol in a vehicle CAN network.
[0057] Referring to fig. 2, various nodes, such as node 101, 102, 103 are connected to a single CAN bus 200. According to the protocol, communication along the CAN bus is message-based to allow messages and data to be sent from one connected device to another. In an exemplary mode, for Near Field Communication (NFC) in the CAN network in the vehicle, only one node need to be NFC enabled and rests of the nodes can communicate with the device 104 through the NFC enabled node 103. The NFC enabled node 103 receives NFC data from the device 104 and transmit the NFC data to other nodes. In the present specification, NFC data is considered for explanation of the present invention and scope of the present in invention is not limited only to NFC data. For implementation and working of the present invention, the data can be any data which is more than 7 bytes and require to transmit over the CAN bus to different nodes.
[0058] Referring to Fig. 3, it is known that the CAN protocol uses only physical layer and data link layer of the Open Systems Interconnection (OSI) model. Each CAN Node has a CAN transmitter and CAN receiver 301, (herein after it can be interchangeably referred as CAN transceiver 301) that is in direct communication with the CAN bus. With the CAN transmitter, the CAN node 300 transmits data to the CAN bus in the defined frame format and with the CAN receiver the CAN node 300 receives data from the CAN bus in the defined frame format and re-constitute the data, accordingly. Further, the CAN node 300 has a CAN controller 302 which is coupled with the CAN transmitter and CAN receiver 301 and a HOST Controller 303. The HOST controller 303 is responsible for functioning of the particular CAN node. The HOST controller is a small micro-
controller that implements application layer of the OSI model. The HOST controller 303 collects information from corresponding application and transmit it to the CAN controller 302. The CAN controller 302 incorporates the Logical link control and Medium Access Control of the data link layer to the received information or data. Further, the CAN controller 302 allows filtering of messages by assigning unique message ID on each message and MAC sub layer frames the message into the defined frame format. After completion of the framing as per the frame format, the frame is transferred to the CAN transceiver 301 for encoding and decoding; and send the frame to the CAN bus 200.
[0059] Referring to Fig. 4, the CAN controller 400 is small micro-computer that has a processor or micro-controller 402, interface 404, memory 406, a processing unit 408 and data 410. The processor(s) 402 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, logic circuitries, and/or any devices that manipulate data based on operational instructions.
[0060] The memory 406 may store one or more computer-readable instructions or routines, which may be fetched and executed to fragment the message data and reconstitute the received fragmented data into defined format at the CAN node 300. The memory 406 may include any non-transitory storage device including, for example, volatile memory such as RAM, or non-volatile memory such as EPROM, flash memory, and the like.
[0061] The interface(s) 404 may include a variety of interfaces, for example, interfaces for data input and output devices referred to as I/O devices, storage devices, and the like. The interface(s) 404 may facilitate communication of the CAN node 300 and the CAN controller 400 with CAN transceiver 301 that is coupled with the CAN bus 200. The interface(s) 404 may also provide a communication pathway for one or more components of the CAN controller 400. Examples of such components include, but are not limited to, processing unit(s) 408 and data 410.
[0062] The processing unit(s) 408 may be implemented as a combination of hardware and programming (for example, programmable instructions) to implement one or more functionalities of the processing unit(s) 408. In examples described herein, such combinations of hardware and programming may be implemented in several different ways. For example, the programming for the processing unit(s) 408 may be processor-executable instructions stored on a non-transitory machine-readable storage medium and the hardware for the processing unit(s) 408 may include a processing resource (for example, one or more processors), to execute such instructions. In the present examples, the machine-readable storage medium may store instructions that, when executed by the processing resource, implement the processing unit(s) 408. In such examples, the CAN controller 400 may include the machine-readable storage medium storing the instructions and the processing resource to execute the instructions or the machine-readable storage medium may be separate but accessible to the CAN controller 400 and the processing resource. In other examples, the processing unit(s) 408 may be implemented by electronic circuitry as a microcontroller.
[0063] In an aspect, the processing unit(s) 408 may include a converter 412. The processing unit(s) 408 may include other unit(s) which may implement functionalities that supplement applications or functions performed by the CAN controller 400 or the processing unit(s) 408.
[0064] Further, the data 410 may include data that is either stored or generated as a result of functionalities implemented by any of the components of the processing unit(s) 408. In present aspects, the data 410 may be stored in the memory 406 in the form of various data structures. Additionally, data 410 can be organized using data models, such as relational or hierarchical data models. The data 410 may store data, including temporary data and temporary files, generated by the processing unit(s) 408 for performing the various functions of the CAN controller 400.
[0065] To explain the present invention, an example of Near Field Communication (NFC) is used however the scope of the present invention is not limited only to NFC data. In the present CAN network, one node 103 (as shown in figure 2) is NFC enabled node means that node 103 can only communicate with other NFC enabled user devices, such as mobile phone 104. Upon establishing a communication link between the NFC enabled user device 104 and the NFC enabled CAN node 103, the NFC enabled node 103 receives the NFC data from the NFC enabled user device 104 and send the data to other CAN nodes via CAN bus 200.
[0066] In operation, when Node 103 receives NFC data of size less than 7 bytes, the Node 103 convert the NFC data into the CAN enabled frame format with the converter 412 of the CAN controller 400 and transmits the converted data to the CAN bus 200 via the CAN transceiver 301. In case when the Node 103 receives NFC data of size more than 7 bytes, the converter 412 of the CAN controller 400 fragment the NFC data as per the stored instructions in the memory 406 and transmit the fragmented data via the CAN transceiver 301.
[0067] When NFC data is less than 7 bytes, the converter 412 converts the NFC data and store the same as per defined frame of the message protocol with message ID and the sequence number of the message as $0, as there is no further following messages, as shown in fig. 5b.
[0068] When the NFC data is more than 7 bytes, the converter 412 converts the data as per the stored instruction in the memory 406 in the defined frame of the message protocol. As shown in fig. 5b, the converter 412 allocates a sequence number $1, $2, $3—$n to each message frame where the first frame with sequence number $1 define data length of the fragmented message with a reliability bit at byte T. In the present frame format of the message, the data field of 0-7 bytes includes a message sequence number and 1-7 byte data.
[0069] For example, if the NFC data is of 51 bytes, the converter 412 fragments the NFC data into 8 frames with same message ID and sequence
number as per fragmentation. Data field of first CAN data frame, i.e., byte '0' that corresponds to first sequence $1 defines data length of the NFC data or CAN data is 51 and there are 8 frames to be transmitted for the present NFC data. After fragmentation, the converter 412 transmits the data to the CAN bus 200 via the CAN transceiver 301. Reliability bit is defined to ensure reliability of the transmitted data. If the reliability bit is dominant or "0", the CAN transceiver 301 of other Nodes will not accept the message from the CAN bus 200. If the reliability bit is recessive or "1", the CAN transceiver 301 of other nodes will receive the message and process the message as per defined applications. Further, reliability bit is decided by the first node which is transmitting messages to the CAN bus 200. For example, the reliability bit is recessive when the node 103 receives the NFC data atleast two times from the NFC enabled user device 104. Further, the reliability bit can be decided based on the vehicle manufacturer to authorize the authenticity of the data.
[0070] Referring to fig. 5c, the byte T of the message frame of fig. 5b indicates reliability bit and 0-6 data length. The data length indicates information about the total length of the data to be coming. For example, the data size of 51 bytes, the data length indicates 51 byte size of the data at the first frame itself, therefore, the converter 412 at the receiving node can optimize the memory at first hand after receiving the first frame. With the present memory optimization, the CAN controller 400 can utilize the memory efficiently by allocating required memory for each message at first instance of receiving the first frame.
[0071] At the receiver side, when there is a plurality of fragment messages or frames are to be received, the CAN controller 400 of the receiver node identifies the message using the unique message ID of the message identifier which is important for extracting data fragments from the same CAN message data and reconstituting the data fragments in accordance with the fragmentation sequence. Upon receiving the first frame of the CAN message data or data, the converter 412 of the receiver node allocates the required memory and data structure as per the data length mentioned in the first byte of the first CAN data frame. The
converter 412 of the receiver node receives the fragmented frames and reconstitute the fragmented frames as per the sequence order defined in each frame. Upon receiving complete data as defined in the data length, the converter 412 of the CAN controller 400 reconstitute the data into original form and transmit the same to the HOST controller of the node for further processing, such as displaying the information or taking corresponding action at the node.
[0072] The converter 412 of the receiver node also has stored instructions to execute the same to receive the fragmented data and reconstitute the same in the original format. The converter 412 of the CAN controller 400 can be a micro¬controller with embedded instructions. Further, in another embodiment, the CAN controller may also be a microcontroller with embedded instructions and it may be provided inside the HOST controller of the CAN node.
[0073] In this way, the present disclosure not only provides a solution for transmission of fragmented data at transmitter node but also provides a solution for reconstituting the fragmented data to original data at receiver node.
[0074] FIG. 6 illustrates a method 600 for implementing a CAN controller, according to an embodiment of the present disclosure. The order in which the method 600 is described is not intended to be construed as a limitation, and any number of the described method blocks can be combined in any appropriate order to carry out the method 600 or an alternative method. Additionally, individual blocks may be deleted from the method 600 without departing from the scope of the subject matter described herein. The present method 600 illustrates a data fragmentation process at a Transmission Node in a CAN network in CAN data Frame transmitting method.
[0075] At block 601, the method 600 includes receiving, CAN message data and determining size of the received CAN message data at transmission node. The CAN controller 400 of the node determines/calculate the size of the CAN message data. If the CAN message data is more than 7 bytes, the method proceeds to block
605. If the CAN message data is less than 7 bytes, the method proceeds to block 602.
[0076] At block 602, the CAN controller 400 of the transmission node generates CAN data frame with the existing CAN protocol. At block 603, the CAN controller 400 allocate sequence byte of the CAN data frame as '$0' that indicates that CAN message data size is less than 7 bytes.
[0077] At block 604, the CAN controller 400 transmits the CAN data frame to the CAN bus through the CAN transceiver 301.
[0078] At block 605, when the CAN message data size is more than 7 bytes, the converter 412 of the CAN controller 400 of the transmission node calculates data length of the CAN message data into number of data bytes and number of CAN data frames to be transmitted for the CAN message data.
[0079] At block 606, the converter 412 allocates sequence number '$1' to byte '0' of the first CAN data frame of fragmented CAN data message.
[0080] At block 607, the converter 412 rechecks whether the sequence of the first CAN data frame is $1 or not. If yes, proceed to block 608. If no, proceed to block 614.
[0081] At block 608, the converter 412 check whether the transmission node has transmitted the CAN data message more than predefined threshold times, for example, 2 and proceed to block 609 when the CAN message data is received more than predefined threshold times.
[0082] At the block 610, the converter 412 changes the reliability bit of the first CAN data frame to recessive bit.
[0083] At block 613, when the CAN message data is transmitted less than predefined threshold times, the converter 412, keeps the reliability bit to dominant bit.
[0084] At block 610, the converter 412 adds the length of the number of data bytes as data length with the reliability bit at byte ' 1' of the first CAN data frame.
[0085] At block 611, the CAN controller 400 transmits the first CAN data frame with sequence number '$1' to the CAN bus 200 with the calculated data length and the reliability bit.
[0086] At block 612, the converter 412 of the CAN controller 400 increases the sequence number of the next CAN data frame by 1 and the converter 412 determines whether the sequence number at byte '0' of the CAN data frame is more than 1 at block 607.
[0087] When sequence number is more than 1, the method proceeds to block 614 where sequence number of the CAN data frame is compared with calculated number of frames. When the sequence number is less than the number of calculated frames, the converter 412 allocates the increased sequence number ($+1) to the CAN data frame and fragmented CAN message data into bytes 1 to 7 and assigned the value of the increased sequence number at the byte '0' of the CAN data frame.
[0088] At block 616, the CAN data frame with increased sequence number carrying data from byte '1' to byte '7' is transmitted to the CAN bus 200 through the CAN controller 400 via the CAN transceiver 301.
[0089] FIG. 7 illustrates a method 700 for implementing a CAN controller, according to an embodiment of the present disclosure. The order in which the method 700 is described is not intended to be construed as a limitation, and any number of the described method blocks can be combined in any appropriate order to carry out the method 700 or an alternative method. Additionally, individual blocks may be deleted from the method 700 without departing from the scope of the subject matter described herein. The present method 700 illustrates a data reconstituting process at a Reception Node in a CAN network in CAN data Frame receiving method. Once the CAN data is fragmented and transmitted to the CAN
bus, the receiver node receives the data and reconstitute the data as per fragmentation and transmit the reconstituted data to the HOST controller.
[0090] At block 701, the method includes initializing the receiver Node to receive the data based on the identifier and set a parameter flag as "OFF" in the memory 406.
[0091] At block 702, the CAN transceiver 301 of the CAN controller 400 of the receiver node receives the CAN data frame, i.e., first frame.
[0092] At block 703, the CAN converter 412 of the CAN controller 400 determines whether the sequence number of the CAN data frame is equal to zero or '$0'. When the sequence number of the received CAN data frame is '$0', the converter 412 extract the CAN message data as per CAN data structure from the CAN data frame at block 704 and further transmit the extracted data to the HOST controller of the receiver node. With the information of data length, the converter 412 allocates only dedicated memory to the CAN data structure as per the data length. Therefore, the converter 412 of the reception node knows the memory to be utilized by the fragmented CAN message data.
[0093] At block 704, when sequence number of the received CAN data frame is not equal to zero or '$0', the converter 412 determines whether the flag is OFF.
[0094] At block 706, when the flag is OFF, the converter 412 of the CAN controller 400 of the receiver node generate a CAN data structure having data length and the sequence number received from the first CAN data frame.
[0095] At block 707, the converter 412 determines whether the frame sequence and reliability bit of the CAN data frame with sequence number $1. When the CAN data frame sequence is '$1' or sequence number 1 and the reliability bit is 1 or recessive, the flag is set 'ON' at block 708. When the CAN data frame sequence is not equal to '$1' and the reliability bit is '0' or dominant, the converter 412 terminates the reconstituting process.
[0096] Once the flag is set ON that indicates that data is reliable and data is fragmented, at block 709, the converter 412 extract data from the CAN data frame sequence number 1 or with sequence '$1' and fills the extracted data into the generated CAN data structure at step 706.
[0097] Once the Flag is set ON, at block 710, the converter 412 extract the CAN data from the different CAN data frames with sequence numbers. The converter 412 fills the extracted data as per the sequence number of the frame into the generated CAN data structure.
[0098] At block 711, when the extracted CAN data is more than or equal to the data length as mentioned in the first CAN data frame, the converter 412 stops extracting further CAN data frames in the particular sequence number.
[0099] Upon receiving the complete data into the generated CAN data structure, the converter 412 reconstitute the CAN message data by extracting the data fragments from the generated CAN data structure as per sequence number. Further, the CAN controller 400 transmits the reconstituted CAN message data to the HOST controller for further processing.
[00100] Thus, with the implementation of the present disclosure, the present disclosure not only provides a solution for effective fragmentation of the CAN message data in the CAN node but also provides a solution for effective utilization of the memory and transmission of fragmented data with less number of frames.
[00101] The above description does not provide specific details of the manufacture or design of the various components. Those of skill in the art are familiar with such details, and unless departures from those techniques are set out, techniques, known, related art or later developed designs and materials should be employed. Those in the art can choose suitable manufacturing and design details.
[00102] It should be understood, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely
convenient labels applied to these quantities. Unless specifically stated otherwise, as apparent from the discussion herein, it is appreciated that throughout the description, discussions utilizing terms such as "receiving," or "determining," or "retrieving," or "installing," or "comparing," or the like, refer to the action and processes of an electronic control unit, or similar electronic device, that manipulates and transforms data represented as physical (electronic) quantities within the control unit's registers and memories into other data similarly represented as physical quantities within the control unit memories or registers or other such information storage, transmission or display devices.
[00103] Further, the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. It will be appreciated that several of the above-disclosed and other features and functions, or alternatives thereof, may be combined into other systems or applications. Various presently unforeseen or unanticipated alternatives, modifications, variations, or improvements therein may subsequently be made by those skilled in the art without departing from the scope of the present disclosure as encompassed by the following claims.
[00104] It will be appreciated that variants of the above-disclosed and other features and functions, or alternatives thereof, may be combined into many other different systems or applications. Various presently unforeseen or unanticipated alternatives, modifications, variations, or improvements therein may be subsequently made by those skilled in the art which are also intended to be encompassed by the following claims.
[00105] The claims, as originally presented and as they may be amended, encompass variations, alternatives, modifications, improvements, equivalents, and substantial equivalents of the embodiments and teachings disclosed herein, including those that are presently unforeseen or unappreciated, and that, for example, may arise from applicants/patentees and others.
We claim:
1.A CAN controller (400) for transmitting Controller Area Network (CAN) data
frames, the CAN controller (400) comprising:
one or more processors (402) coupled to a memory (406) and a converter (412), the converter (412) configured to:
calculate data length of a CAN message data and number of CAN data frames based on the calculated data length;
fragment the CAN message data into data fragments sequentially, when size of the CAN message data is more than 7 bytes;
generate, based on the calculated data length of the CAN message data, a CAN data frame for each of the data fragments, each of CAN data frame includes data field and sequence number field; and
transmit the generated number of CAN data frames to a CAN bus (200).
2.The CAN controller (400) as claimed in claim 1, wherein the sequence number field contains information about sequence number of the CAN data frame from the number of CAN data frames.
3.The CAN controller (400) as claimed in claim 1, wherein the sequence number field allocated to byte '0' of data field of each of the CAN data frame and the size of data field is defined from byte 1 to 7 having fragmented CAN message data.
4.The CAN controller (400) as claimed in claim 1, wherein the calculated data length is allocated to data length field of first CAN data frame from the number of CAN data frames, the data length field is allocated to byte ' 1'.
5.A CAN controller (400) for receiving Controller Area Network (CAN) data frames and reconstituting the CAN data frames, the CAN controller (400) comprising:
one or more processors (402) coupled to a memory (406) and a converter (412), the converter (412) configured to:
receive a first CAN data frame from the CAN data frames;
generate, based on the first CAN data frame, a CAN data structure having information about data length and sequence number;
set flag 'ON' when sequence number of the CAN data frame is equal to T and reliability bit of the CAN data frame is recessive;
extract the data fragments of the CAN message data from the CAN data frames until the CAN data length of the extracted CAN message data is equal to or more than the data length; and
fill the data fragments data into the CAN data structure and reconstitute the CAN message data by extracting data fragments from the CAN data structure as per sequence number of the number of CAN data frames.
6.The CAN controller (400) as claimed in claim 4, wherein the flag having 'ON' and 'OFF' conditions is a parameter defined in the memory (406).
7.The CAN controller (400) as claimed in claim 4, wherein the flag is initialized to "OFF" condition.
8.The CAN controller (400) as claimed in claim 4, wherein the data length of the CAN data structure is defined by the data length mentioned in the first CAN data frame having sequence number 1.
9.A CAN node (300) for transmitting and receiving a plurality of CAN data frames, the CAN node (300) comprising:
a CAN transceiver (301) coupled with CAN bus (200) for transmitting and receiving the plurality of CAN data frames;
a HOST controller (303) configured to perform functions of the CAN node (300); and
a CAN controller (302) coupled with the CAN transceiver (301) and the HOST controller (303), the CAN controller (302) configure to:
receive CAN message data from the HOST controller (303);
convert the received CAN message data into the number of CAN data frames based on data length; and
transfer the number of CAN data frames to the CAN transceiver (301) for communication with the CAN bus (200).
10. The CAN node (300) as claimed in claim 9, wherein the CAN controller (302)
configure to:
calculate data length of a CAN message data and number of CAN data frames based on the calculated data length;
fragment the CAN message data into data fragments, when size of the CAN message data is more than 7 bytes;
generate, based on the calculated data length of the CAN message data, a CAN data frame for each of the data fragments including data field and sequence number field to each of the CAN data frame; and
transmit the generated number of CAN data frames to the CAN transceiver (301).
11. A method (600) for transmitting a plurality of CAN data frames, the method
(600) comprising:
calculating, by a CAN controller (400, 302), data length of a CAN message data and number of frames based on the data length;
fragmenting, by the CAN controller (400, 302), the CAN message data into data fragments, when size of the CAN message data is more than 7 bytes;
generating, by the CAN controller (400, 302), a CAN data frame for each of the data fragments based on the calculated data length of the CAN
message data, each of CAN data frame includes a data field and a sequence number field; and
transmitting, by a CAN transceiver (301), the generated number of CAN data frames to a CAN bus (200).
12. The method (600) as claimed in claim 11, wherein the generating further
comprises:
adding data length of the CAN message data when the sequence number of the CAN data frame is equal to T and Reliability bit is recessive;
transmitting the first CAN data frame with data length and reliability bit;
increasing the sequence number by '1' and adding the increased sequence number to the CAN data frame at byte '0' until the increased sequence number is less than the calculated number of frames; and
transmit the number of CAN data frames with the data fragments until the calculated data length of the CAN message is transmitted.
13. The method (600) as claimed in claim 11, wherein the generating further
comprises:
adding the data fragments to the data field of the CAN data frame, where byte '0' of the data field is allocated to the sequence number and bytes 1 to 7 allocated to the data fragments of the CAN message data.
14. The method (600) as claimed in claim 12, wherein the sequence number field is allocated to byte '0' of data field of the CAN data frame and the data length field is allocated to byte ' 1' of first CAN data frame from the number of CAN data frames.
15. A method (700) for receiving Controller Area Network (CAN) data frames and reconstituting the CAN data frames, the method (700) comprising:
receiving, by a CAN transceiver (301), a first CAN data frame from number of CAN data frames;
generating, by a CAN controller (302, 400), a CAN data structure having information about data length and sequence number based on the first CAN data frame having information about sequence number and data length;
setting, by the CAN controller (302, 400), flag 'ON' when sequence number of the CAN data frame is equal to '1' and reliability bit of the CAN data frame is recessive;
extracting, by the CAN controller (302, 400), data fragments of the CAN message data from the number of CAN data frames until the CAN data length of the extracted data fragments is equal to or more than the data length; and
filling, by the CAN controller (302, 400), the extracted data fragments of the CAN message data into the CAN data structure and reconstitute the CAN message data by extracting the data fragments from the CAN data structure as per sequence number of the CAN data frames.
16. The method (700) as claimed in claim 15, wherein the flag defining 'ON' and 'OFF' conditions is a parameter defined in the memory (406).
17.The method (700) as claimed in claim 15, wherein, initially, the flag is initialized to "OFF" condition.
18.The method (700) as claimed in claim 15, wherein the data length of the CAN data structure defined by the data length mentioned in first CAN data frame with sequence number 1.
| # | Name | Date |
|---|---|---|
| 1 | 201911035104-STATEMENT OF UNDERTAKING (FORM 3) [30-08-2019(online)].pdf | 2019-08-30 |
| 2 | 201911035104-PROOF OF RIGHT [30-08-2019(online)].pdf | 2019-08-30 |
| 3 | 201911035104-POWER OF AUTHORITY [30-08-2019(online)].pdf | 2019-08-30 |
| 4 | 201911035104-FORM 1 [30-08-2019(online)].pdf | 2019-08-30 |
| 5 | 201911035104-FIGURE OF ABSTRACT [30-08-2019(online)].jpg | 2019-08-30 |
| 6 | 201911035104-DRAWINGS [30-08-2019(online)].pdf | 2019-08-30 |
| 7 | 201911035104-DECLARATION OF INVENTORSHIP (FORM 5) [30-08-2019(online)].pdf | 2019-08-30 |
| 8 | 201911035104-COMPLETE SPECIFICATION [30-08-2019(online)].pdf | 2019-08-30 |
| 9 | abstract.jpg | 2019-09-14 |
| 10 | 201911035104-Proof of Right (MANDATORY) [17-10-2019(online)].pdf | 2019-10-17 |
| 11 | 201911035104-FORM-26 [17-10-2019(online)].pdf | 2019-10-17 |
| 12 | 201911035104-Power of Attorney-211019.pdf | 2019-10-22 |
| 13 | 201911035104-OTHERS-211019.pdf | 2019-10-22 |
| 14 | 201911035104-Correspondence-211019.pdf | 2019-10-22 |
| 15 | 201911035104-FORM 18 [04-06-2020(online)].pdf | 2020-06-04 |
| 16 | 201911035104-FER.pdf | 2021-11-17 |
| 17 | 201911035104-FER_SER_REPLY [29-04-2022(online)].pdf | 2022-04-29 |
| 18 | 201911035104-CLAIMS [29-04-2022(online)].pdf | 2022-04-29 |
| 19 | 201911035104-PatentCertificate14-08-2023.pdf | 2023-08-14 |
| 20 | 201911035104-IntimationOfGrant14-08-2023.pdf | 2023-08-14 |
| 21 | 201911035104-PROOF OF ALTERATION [28-06-2024(online)].pdf | 2024-06-28 |
| 1 | SearchStrategy_201911035104E_15-11-2021.pdf |