你好,多谢,
但是我们主要是选用tms570ls20216来开发flexray的程序,而买的开发板上带的程序的fray.c,基本上就没写什么例程
而且halcogen里面flexray的模块是灰色的,无法自动生成代码例程的。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
www.ti.com.cn/.../Halcogen Documents
halcogen没有用过,而且ti官网链接上,显示其并不支持tms570ls20216
请问官网上有没有halcogen的使用教程,谢谢
我这有一个简单的SPI发送的main程序,你可以参照一下:
/** @file sys_main.c
* @brief Application main file
* @date 7.January.2013
* @version 03.04.00
*
* This file contains an empty main function,
* which can be used for the application.
*/
/* (c) Texas Instruments 2009-2013, All rights reserved. */
/* USER CODE BEGIN (0) */
/* USER CODE END */
/* Include Files */
#include "sys_common.h"
#include "system.h"
/* USER CODE BEGIN (1) */
#include "spi.h"
#include "rti.h"
/* USER CODE END */
/** @fn void main(void)
* @brief Application main function
* @note This function is empty by default.
*
* This function is called after startup.
* The user can use this function to implement the application.
*/
/* USER CODE BEGIN (2) */
uint16_t Tx_Data_SPI[16];
uint16_t Rx_Data_SPI[16];
#define TG_LENGTH 16
spiDAT1_t dataconfig;
int count=0;
/* USER CODE END */
void main(void)
{
/* USER CODE BEGIN (3) */
int i=0;
spiInit();
rtiInit();
rtiEnableNotification(rtiNOTIFICATION_COMPARE0);
rtiStartCounter(rtiCOUNTER_BLOCK0);
_enable_IRQ();
Tx_Data_SPI[0] = 0xaaaa;
for(i=1;i<TG_LENGTH;i++)
{
Tx_Data_SPI[i] =~ Tx_Data_SPI[i-1];
}
while(1)
{
}
/* USER CODE END */
}
/* USER CODE BEGIN (4) */
void rtiNotification(uint32 notification)
{
/* enter user code between the USER CODE BEGIN and USER CODE END. */
/* USER CODE BEGIN (9) */
count++;
if(count==2)
{
count=0;
dataconfig.CSNR = 0;
dataconfig.CS_HOLD =0;//1
dataconfig.DFSEL = 0;
dataconfig.WDEL = 1;//1
spiTransmitAndReceiveData(spiREG5,&dataconfig,TG_LENGTH,Tx_Data_SPI,Rx_Data_SPI);
}
/* USER CODE END */
}
/* USER CODE END */
谢谢