丫小米

    1. nemo1991 发表于 2015-4-3 10:23 哈哈,是这样的,习惯看一下框图就好了。 看到TXINTENA了吗? 就是TXRDY可以后面的开关。
      啊!原来是这样~确实一直不会看框图,非常感谢!
    2. nemo1991 发表于 2015-4-3 09:31 1.发送中断时28027发送字符才进入的。 2.如果需要接收两位数,你需要设置一个帧头,最好也有桢尾,中间放上你要加的数据。
      谢谢!但是针对第一个问题,对于sci_loopback_int的例程还是不太理解,因为主程序中并没有发送字符的语句,那第一次中断是如何进入的呢? 例程代码如下: #include "DSP28x_Project.h"     // Device Headerfile and Examples Include File #define CPU_FREQ         40E6        // Default = 40 MHz. Change to 60E6 for 60 MHz devices #define LSPCLK_FREQ CPU_FREQ/4 #define SCI_FREQ         100E3 #define SCI_PRD         (LSPCLK_FREQ/(SCI_FREQ*8))-1 // Prototype statements for functions found within this file. interrupt void sciaTxFifoIsr(void); interrupt void sciaRxFifoIsr(void); interrupt void scibTxFifoIsr(void); interrupt void scibRxFifoIsr(void); void scia_fifo_init(void); void scib_fifo_init(void); void error(void); // Global variables Uint16 sdataA[2];    // Send data for SCI-A Uint16 rdataA[2];    // Received data for SCI-A Uint16 rdata_pointA; // Used for checking the received data void main(void) {    Uint16 i; // Step 1. Initialize System Control: // PLL, WatchDog, enable Peripheral Clocks // This example function is found in the DSP2802x_SysCtrl.c file.    InitSysCtrl(); // Step 2. Initalize GPIO: // This example function is found in the DSP2802x_Gpio.c file and // illustrates how to set the GPIO to it's default state. // InitGpio(); // Setup only the GP I/O only for SCI-A and SCI-B functionality // This function is found in DSP2802x_Sci.c    InitSciGpio(); // Step 3. Clear all interrupts and initialize PIE vector table: // Disable CPU interrupts    DINT; // Initialize PIE control registers to their default state. // The default state is all PIE interrupts disabled and flags // are cleared. // This function is found in the DSP2802x_PieCtrl.c file.    InitPieCtrl(); // Disable CPU interrupts and clear all CPU interrupt flags:    IER = 0x0000;    IFR = 0x0000; // Initialize the PIE vector table with pointers to the shell Interrupt // Service Routines (ISR). // This will populate the entire table, even if the interrupt // is not used in this example.  This is useful for debug purposes. // The shell ISR routines are found in DSP2802x_DefaultIsr.c. // This function is found in DSP2802x_PieVect.c.    InitPieVectTable(); // Interrupts that are used in this example are re-mapped to // ISR functions found within this file.    EALLOW;        // This is needed to write to EALLOW protected registers    PieVectTable.SCIRXINTA = &sciaRxFifoIsr;    PieVectTable.SCITXINTA = &sciaTxFifoIsr;    EDIS;   // This is needed to disable write to EALLOW protected registers // Step 4. Initialize all the Device Peripherals: // This function is found in DSP2802x_InitPeripherals.c // InitPeripherals(); // Not required for this example    scia_fifo_init();  // Init SCI-A // Step 5. User specific code, enable interrupts: // Init send data.  After each transmission this data // will be updated for the next transmission    for(i = 0; i
    3. TMS320F28335项目开发记录10_28335之SCI模块 5/13914 微控制器 MCU 2015-04-03
      楼主您好,非常感谢您的整理,很清晰,很棒!在这里有几个问题想问: 我最近在学28027,恰好看到Sci,和28335是非常类似的,但是看controlsuite里面的例程,有一点疑惑想问:在sci_loopback_int例程中,是怎样进入发送中断和接收中断的? 我本来觉得接收中断应该是我们在串口输入一个字符,点击发送就触发了(这里的话因为是Loopback,所以进入发送中断后,发送数据,就进入接收中断),但发送中断是怎么进入的就非常不理解了。 看到有说法是说把Sci初始化后就有定时器进行计时,到一定数后即触发中断,如果是这样,那定时器的配置在初始化中似乎并没有体现。 也有说法是根据中断标志位来进入中断,但似乎初始化函数里并没有把中断标志置1. 不知楼主能否帮我解答,谢谢~ 此外,还有一个问题,用Sci每次接收的是一个字符,那如果我希望接收输入的一个两位数,来改变程序中的某个变量值,应该怎么编程比较合理呢?
    4. TI 电源培训系列电子书---开关电源基础知识 846/83988 模拟与混合信号 2015-03-22
      初学电源设计,因此希望可以好好学习一下
    5. ccs v5 3/3894 电子竞赛 2014-12-18
      到安装目录下看看有没有/tools/compiler文件夹。里面有没有你要用的那个device family的文件 如果没有的话去下载一个,放进来。或者重新安装记得选complier。 如果有,看看是不是360或者什么防火墙把它给禁了【亲身经历。。。】解禁就好了
    6. 新手,希望获得帮助
    7. 初学必备STM32菜鸟学习手册 917/76235 stm32/stm8 2014-12-01
      新手,希望能获得帮助

最近访客

< 1/1 >

统计信息

已有7人来访过

  • 芯积分:--
  • 好友:--
  • 主题:1
  • 回复:7

留言

你需要登录后才可以留言 登录 | 注册


现在还没有留言