About ST
Products
Applications
Support
Buy
News & Events
ST Worldwide
Contact Us
Login
Application Notes
|
STM32F10xxx CAN application examples
Application Note
Format:
(32 kb)
or
(4 kb)
Last Updated: 14/06/2007
Pages: 4
Related Datasheets
Medium-density access line, ARM-based 32-bit MCU with 32 to 128 KB Flash, six timers, ADC and 7 communication interfaces
Medium-density performance line ARM-based 32-bit MCU with 32 to 128 KB Flash, USB, CAN, 7 timers, 2 ADCs, 9 communication interfaces
Raw Ascii Text
- (
Hide
)
(Unformatted textual content of the document used by search engines)
AN2561 Application note
STM32F10xxx CAN application examples
Introduction
This application note is intended to provide practical application examples of the STM32F10xxx CAN peripheral use. This document, its associated firmware, and other such application notes are written to accompany the STM32F10xxx firmware library. These are available for download from the STMicroelectronics website: www.st.com.
June 2007
Rev 1
1/4
www.st.com
STM32F10xxx CAN communication in Loop Back mode
AN2561 - Application note
1
STM32F10xxx CAN communication in Loop Back mode
Overview
This section describes how to use the CAN firmware library to communicate in Loop Back mode. An example is given that uses most of the CAN driver functionality: configure, send, receive, etc.
1.1
1.2
Firmware description
The provided firmware includes the CAN driver that supports all CAN communications through a set of functions. An example of use for most of these functions is provided. The CAN cell first performs a transmission and a reception of a standard data frame by polling at 100 Kbits/s. The received frame is checked and some LEDs light up to indicate whether the communication was successful. Then, an extended data frame is transmitted at 500 Kbits/s. Reception is done in the interrupt handler when the message becomes pending in the FIFO. Finally, the LEDs indicate if both transmission and reception have been successful. This firmware is provided as the CAN example in the STM32F10xxx firmware library, available from the STMicroelectronics microcontrollers website.
1.3
Conclusion
Using this CAN driver example, it is possible to develop greater and more complex communication applications between the STM32F10xxx and any interfaced CAN, without connecting to a CAN bus.
2/4
AN2561 - Application note
Revision history
2
Revision history
Table 1.
Date 14-Jun-2007
Document revision history
Revision 1 Initial release. Changes
3/4
AN2561 - Application note
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST's terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST'S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER'S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.
2007 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com
4/4
Document Number: 13603