example-10.txt

来自「DSP TMS320 LF2407 or 243 经典 例程, from TI」· 文本 代码 · 共 35 行

TXT
35
字号
Example 10 : F243CAN2

 

Environment : 

This Example was made for TI's EVM-board TMS320F243. For this partcular exercise we need an additional connector to the CAN-network and the LED's from example #1. To build a CAN-connector see into the manual for the EVM243-board. A CAN-analyzer is very helpful to supervise the traffic on the CAN-bus. 

Aim:

The program monitors the CAN-receiver by polling. Each time when a CAN-data-frame with standard identifier 0x160 was received, the first databyte of the message is copied to the LED's on GPIO D0..D7 . We use a standard-CAN-frame with a data rate of 100 kBaud to match the CAN of the Laboratory in Zwickau. The algoritm uses mailbox #0 as the receiver mailbox and a polling method. The Identifier for the expected frame is 0x160. This program should be used together with the transmit program (see example #11) running at a second F234-EVM-board.

 

Files: 

The Example should be used as a project in Code-Composer, the Go-DSP-design tool. The project consists of these files : 

 f243can2.c     -- C-source code for this example

 vectors.asm   -- jump table for Interrupt Service Routines

 regs243.h      -- pointer definitions to memory mapped  perihperals

 f243can2.cmd -- memory map definition file for the linker

 init243.gel       -- Code Composer Setup file ( GO-DSP extension language )

 rts2xx.lib          -- runtime library file (part of TI's compiler/assembler) 

 wait.asm     -- small collection of supplemental assembler functions

  

    Download (all files zipped):   Example 10

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?