Claims
- 1. A CAN microcontroller that supports a plurality of uniquely-numbered message objects, comprising:a processor core that runs CAN applications; a plurality of message buffers associated with respective ones of the message objects; a plurality of individual message object registers associated with each message object, including at least one control register that contains an interrupt-enable control bit, a receive enable bit, and a transmit enable bit; a plurality of global message object control registers, including: at least one message complete status register that contains a plurality of status flag bits for respective ones of the message objects; at least one interrupt flag register that contains a receive complete interrupt flag bit and a transmit complete interrupt flag bit; and, a message complete info register that contains a plurality of message object identification bits and a status bit; a CAN/CAL module that automatically assembles fragmented, multi-frame messages, wherein the CAN/CAL module includes: an acceptance filtering function that performs acceptance filtering on each incoming, multi-frame message by comparing a screener field of the incoming, multi-frame message with an acceptance filter field associated with each message object which has its associated receive enable bit set, wherein the incoming, multi-frame message is accepted if its screener field matches the acceptance filter field of a receive-enabled message object; a message handling function that automatically transfers successive frames of an accepted incoming multi-frame message to the message buffer associated with the matching receive-enabled message object; an end-of-message detection function that detects an end-of-message condition which occurs when the last frame of the accepted incoming multi-frame message has been stored in the message buffer associated with the matching receive-enabled message object; and, an end-of-message detection handling and interrupt generation function that, in response to the detection of the end-of-message condition: sets the status flag bit contained in the at least one message complete status register corresponding to the matching receive-enabled message object; sets the receive complete interrupt flag bit contained in the at least one interrupt flag register, if the interrupt-enable control bit contained in the at least one control register associated with the matching receive-enabled message object is set; and, sets the status bit contained in the message complete info register, if the interrupt-enable control bit contained in the at least one control register associated with the matching receive-enabled message object is set.
- 2. The CAN microcontroller as set forth in claim 1, further comprising a data memory space, the plurality of message buffers being located in the data memory space.
- 3. The CAN microcontroller as set forth in claim 1, wherein the CAN/CAL module includes a DMA engine that facilitates direct transfers of message data to the message buffers without interrupting the processor core.
- 4. The CAN microcontroller as set forth in claim 1, wherein the individual message object registers and the global message object control registers comprise memory-mapped registers.
- 5. The CAN microcontroller as set forth in claim 1, further comprising:a data memory space; and, wherein the individual message object registers and the global message object control registers comprise memory-mapped registers that are mapped to a respective portion of the data memory space.
- 6. The CAN microcontroller as set forth in claim 1, wherein the plurality of message buffers are located in the data memory space.
- 7. The CAN microcontroller as set forth in claim 1, wherein the at least one control register associated with each message buffer is programmable for the purpose of enabling or disabling the interrupt-enable control bit, the receive enable bit, and the transmit enable bit.
- 8. The CAN microcontroller as set forth in claim 1, wherein the end-of-message detection handling and interrupt generation function:monitors the status of the status flag bits contained in the at least one global message object control register, and the status of the interrupt-enable control bits contained in the individual message object registers, in order to identify the lowest-numbered interrupt-enabled message object whose associated status flag bit is set; and, sets the plurality of message object identification bits contained in the message complete info register to reflect the object number of the lowest-numbered interrupt-enabled message object whose associated status flag bit is set.
- 9. The CAN microcontroller as set forth in claim 1, wherein the end-of-message detection handling and interrupt generation function monitors the status of the status flag bits contained in the at least one global message object control register, and the status of the interrupt-enable control bits contained in the individual message object registers, every clock cycle of a system clock.
- 10. The CAN microcontroller as set forth in claim 1, wherein a current application running on the processor core checks the status of the status flag bits contained in the at least one message complete status register, at selected times.
- 11. The CAN microcontroller as set forth in claim 1, wherein a current application running on the processor core checks the status of the status bit contained in the message complete info register to determine whether or not there are any pending completed messages associated with a respective interrupt-enabled message object.
- 12. The CAN microcontroller as set forth in claim 11, wherein, in response to a determination that there is a pending completed message based on the status of the status bit contained in the message complete info register, the current application running on the processor core:processes the completed message corresponding to the lowest-numbered receive-enabled message object identified by the message object identification bits contained in the message complete info register; clears the status flag bit contained in the at least one control register associated with the lowest-numbered receive-enabled message object; checks the status of the status bit contained in the message complete info register; and, repeats each of the above-recited operations if the status bit contained in the message complete info register is enabled, until the status flag bit is no longer enabled.
- 13. The CAN microcontroller as set forth in claim 1, wherein the CAN/CAL module generates a message-complete interrupt in response to detection of an end-of-message condition if the interrupt-enable control bit contained in the at least one control register associated with the matching receive-enabled message object is enabled.
- 14. The CAN microcontroller as set forth in claim 10, wherein the current application running on the processor core processes the completed message corresponding to the message object associated with an enabled status flag bit that is contained in the at least one message complete status register.
- 15. The CAN microcontroller as set forth in claim 13, wherein the current application running on the processor core processes the completed message corresponding to the matching, interrupt-enabled, receive-enabled message object, in response to the message-complete interrupt.
- 16. A CAN microcontroller that supports a plurality of uniquely-numbered message objects, comprising:a processor core that runs CAN applications; a plurality of message buffers associated with respective ones of the message objects; a plurality of individual message object registers associated with each message object, including at least one control register that contains an interrupt-enable control bit, a transmit enable bit, and a receive enable bit; a plurality of global message object control registers, including: at least one message complete status register that contains a plurality of status flag bits for respective ones of the message objects; at least one interrupt flag register that contains a receive complete interrupt flag bit and a transmit complete interrupt flag bit; and, a message complete info register that contains a plurality of message object identification bits and a status bit; a CAN/CAL module that automatically assembles fragmented, multi-frame messages, wherein the CAN/CAL module includes: a message handling function that automatically transfers successive frames of an incoming multi-frame message to the message buffer associated with a corresponding message object; an end-of-message detection function that detects an end-of-message condition which occurs when the last frame of the accepted incoming multi-frame message has been stored in the message buffer associated with the corresponding message object; and, an end-of-message detection handling and interrupt generation function that, in response to the detection of the end-of-message condition: sets the status flag bit contained in the at least one message complete status register associated with the corresponding message object; sets the receive complete interrupt flag bit contained in the at least one interrupt flag register, if the interrupt-enable control bit contained in the at least one control register associated with the corresponding message object is set; and, sets the status bit contained in the message complete info register, if the interrupt-enable control bit contained in the at least one control register associated with the corresponding message object is set.
- 17. The CAN microcontroller as set forth in claim 16, wherein the at least one control register associated with each message buffer is programmable for the purpose of enabling or disabling the interrupt-enable control bit, the receive enable bit, and the transmit enable bit.
- 18. The CAN microcontroller as set forth in claim 16, wherein the end-of-message detection handling and interrupt generation function:monitors the status of the status flag bits contained in the at least one global message object control register, and the status of the interrupt-enable control bits contained in the individual message object registers, in order to identify the lowest-numbered interrupt-enabled message object whose associated status flag bit is set; and, sets the plurality of message object identification bits contained in the message complete info register to reflect the object number of the lowest-numbered interrupt-enabled message object whose associated status flag bit is set.
- 19. The CAN microcontroller as set forth in claim 16, wherein the end-of-message detection handling and interrupt generation function monitors the status of the status flag bits contained in the at least one global message object control register, and the status of the interrupt-enable control bits contained in the individual message object registers, every clock cycle of a system clock.
- 20. The CAN microcontroller as set forth in claim 16, wherein a current application running on the processor core checks the status of the status flag bits contained in the at least one message complete status register, at selected times.
- 21. The CAN microcontroller as set forth in claim 16, wherein a current application running on the processor core checks the status of the status bit contained in the message complete info register to determine whether or not there are any pending completed messages associated with a respective interrupt-enabled message object.
- 22. The CAN microcontroller as set forth in claim 21, wherein, in response to a determination that there is a pending completed message based on the status of the status bit contained in the message complete info register, the current application running on the processor core:processes the completed message corresponding to the lowest-numbered receive-enabled message object identified by the message object identification bits contained in the message complete info register; clears the status flag bit contained in the at least one control register associated with the lowest-numbered receive-enabled message object; checks the status of the status bit contained in the message complete info register; and, repeats each of the above-recited operations if the status bit contained in the message complete info register is enabled, until the status flag bit is no longer enabled.
- 23. The CAN microcontroller as set forth in claim 16, wherein the CAN/CAL module generates a message-complete interrupt in response to detection of an end-of-message condition if the interrupt-enable control bit contained in the at least one control register associated with the corresponding receive-enabled message object is enabled.
- 24. The CAN microcontroller as set forth in claim 20, wherein the current application running on the processor core processes the completed message corresponding to the message object associated with an enabled status flag bit that is contained in the at least one message complete status register.
- 25. The CAN microcontroller as set forth in claim 23, wherein the current application running on the processor core processes the completed message, in response to the message-complete interrupt.
- 26. A CAN microcontroller that supports a plurality of uniquely-numbered message objects, comprising:a processor that runs CAN applications; means for selectively enabling any one or more of the message objects for interrupt generation; means for monitoring incoming messages to determine when an end-of-message condition occurs; means for generating a completed message status flag for a particular message object in response to a determination that an end-of-message condition has occurred with respect to that particular message object; means for generating a message-complete interrupt to the processor in response to a determination that an end-of-message condition has occurred with respect to any message object that has been interrupt-enabled; and means for generating an indication of the lowest-numbered message object for which it has been determined an end-of-message condition has occurred.
- 27. The CAN microcontroller as set forth in claim 26, further comprising means for generating an indication of the lowest-numbered, interrupt-enabled message object for which it has been determined an end-of-message condition has occurred.
- 28. The CAN microcontroller as set forth in claim 26, further comprising means for generating pending message-complete status flag whenever there is at least one message object that has a completed message status flag associated therewith.
- 29. The CAN microcontroller as set forth in claim 26, further comprising means for generating pending message-complete status flag whenever there is at least one interrupt-enabled message object that has a completed message status flag associated therewith.
- 30. The CAN microcontroller as set forth in claim 27, wherein a current CAN application running on the processor, in response to the message-complete interrupt, processes the completed message corresponding to the lowest-numbered message object for which it has been determined an end-of-message condition has occurred.
- 31. The CAN microcontroller as set forth in claim 26, wherein a current CAN application running on the processor, in response to the message-complete interrupt, processes the completed message corresponding to the lowest-numbered message object for which it has been determined an end-of-message condition has occurred.
Parent Case Info
This application claims the full benefit and priority of U.S. Provisional Application Serial No. 60/154,022, filed on Sep. 15, 1999, the disclosure of which is fully incorporated herein for all purposes.
US Referenced Citations (9)
Foreign Referenced Citations (3)
Number |
Date |
Country |
4340219 |
Jun 1995 |
DE |
2293470 |
Mar 1996 |
GB |
WO8400836 |
Mar 1984 |
WO |
Provisional Applications (1)
|
Number |
Date |
Country |
|
60/154022 |
Sep 1999 |
US |