C6748 上跑SYSBIOS 实现SPI通信 - TMS320C6748 - 嵌入式开发者社区 - 51ele.net
设为首页收藏本站

嵌入式开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 4546|回复: 2
打印 上一主题 下一主题

C6748 上跑SYSBIOS 实现SPI通信

[复制链接]

1

主题

3

帖子

1035

积分

金牌会员

Rank: 6Rank: 6

积分
1035
跳转到指定楼层
楼主
发表于 2014-8-29 14:38:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
StarterWare的裸板程序里面有个中断映射过程,我在SYSBIOS下如何实现?需要这个过程么?
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖
回复

使用道具 举报

15

主题

1357

帖子

4579

积分

创龙

Rank: 8Rank: 8

积分
4579
沙发
发表于 2014-8-29 19:01:05 | 只看该作者



1、可以使用 Starterware 中断管理 但不推荐
2、使用 HWI
回复 支持 反对

使用道具 举报

1

主题

3

帖子

1035

积分

金牌会员

Rank: 6Rank: 6

积分
1035
板凳
 楼主| 发表于 2014-8-30 15:08:03 | 只看该作者
希望缄默 发表于 2014-8-29 19:01
1、可以使用 Starterware 中断管理 但不推荐
2、使用 HWI

昨天已经找到方法了,就是用HWI,忘记过来写答案了,谢谢啦
static void SetUpInt(void)
{
        Hwi_Params hwiParams;
      Error_Block eb;
   
      Hwi_Params_init(&hwiParams);
      Error_init(&eb);
  
      
   
      // set the event id 37 of the peripheral assigned to this interrupt
      hwiParams.eventId = SYS_INT_SPI0_INT;   
   
      // don't allow any interrupt to nest
      hwiParams.maskSetting = Hwi_MaskingOption_ALL;
   
      //
      // Configure interrupt 4 to invoke "SPIIsr".
      // Automatically enables interrupt 4 by default
      // set params.enableInt = FALSE if you want to control
      // when the interrupt is enabled using Hwi_enableInterrupt()
      //
   
      myHwi = Hwi_create(4, SPIIsr, &hwiParams, &eb);
   
      if (Error_check(&eb)) {
          // handle the error
                  System_abort  ("SPI Interrupt initialization is failed\n");
                  
      }
}
我是这样写的,请问对么?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|嵌入式开发者社区 ( 粤ICP备15055271号

GMT+8, 2024-4-20 17:30 , Processed in 0.041095 second(s), 25 queries .

Powered by Discuz! X3.2

© 2001-2015 Comsenz Inc.

快速回复 返回顶部 返回列表