TI中文支持网
TI专业的中文技术问题搜集分享网站

TM4C129NCPDT 在Bootloader中UART3串口不能中断

TI M4 UART3串口RX中断 同样的配置在application中是可以进入中断的,但是在bootloader里,进不了中断。 中断入口函数也配置了,是否还有其他地方需要设置?我发现默认启动文件.S文件里面的中断向量表里面没有uart3入口,所以自己添加了,但是offset地址>0x110时,bootloader就运行不了。但是uart3的offset地址是0x12C。是不是bootloader中大小限制呢?

xyz549040622:

启动文件中有uart3的中断入口地址了呀。

//*****************************************************************************
//
// startup_ccs.c - Startup code for use with TI's Code Composer Studio.
//
// Copyright (c) 2013-2017 Texas Instruments Incorporated.All rights reserved.
// Software License Agreement
//// Texas Instruments (TI) is supplying this software for use solely and
// exclusively on TI's microcontroller products. The software is owned by
// TI and/or its suppliers, and is protected under applicable copyright
// laws. You may not combine this software with "viral" open-source
// software in order to form a larger program.
//// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
// DAMAGES, FOR ANY REASON WHATSOEVER.
//// This is part of revision 2.1.4.178 of the DK-TM4C129X Firmware Package.
//
//*****************************************************************************#include <stdint.h>
#include "inc/hw_nvic.h"
#include "inc/hw_types.h"//*****************************************************************************
//
// Forward declaration of the default fault handlers.
//
//*****************************************************************************
void ResetISR(void);
static void NmiSR(void);
static void FaultISR(void);
static void IntDefaultHandler(void);//*****************************************************************************
//
// External declaration for the reset handler that is to be called when the
// processor is started
//
//*****************************************************************************
extern void _c_int00(void);//*****************************************************************************
//
// Linker variable that marks the top of the stack.
//
//*****************************************************************************
extern uint32_t __STACK_TOP;//*****************************************************************************
//
// External declarations for the interrupt handlers used by the application.
//
//*****************************************************************************
extern void lwIPEthernetIntHandler(void);
extern void SysTickHandler(void);//*****************************************************************************
//
// The vector table.Note that the proper constructs must be placed on this to
// ensure that it ends up at physical address 0x0000.0000 or at the start of
// the program if located at a start address other than 0.
//
//*****************************************************************************
#pragma DATA_SECTION(g_pfnVectors, ".intvecs")
void (* const g_pfnVectors[])(void) =
{(void (*)(void))((uint32_t)&__STACK_TOP),// The initial stack pointerResetISR,// The reset handlerNmiSR,// The NMI handlerFaultISR,// The hard fault handlerIntDefaultHandler,// The MPU fault handlerIntDefaultHandler,// The bus fault handlerIntDefaultHandler,// The usage fault handler0,// Reserved0,// Reserved0,// Reserved0,// ReservedIntDefaultHandler,// SVCall handlerIntDefaultHandler,// Debug monitor handler0,// ReservedIntDefaultHandler,// The PendSV handlerSysTickHandler,// The SysTick handlerIntDefaultHandler,// GPIO Port AIntDefaultHandler,// GPIO Port BIntDefaultHandler,// GPIO Port CIntDefaultHandler,// GPIO Port DIntDefaultHandler,// GPIO Port EIntDefaultHandler,// UART0 Rx and TxIntDefaultHandler,// UART1 Rx and TxIntDefaultHandler,// SSI0 Rx and TxIntDefaultHandler,// I2C0 Master and SlaveIntDefaultHandler,// PWM FaultIntDefaultHandler,// PWM Generator 0IntDefaultHandler,// PWM Generator 1IntDefaultHandler,// PWM Generator 2IntDefaultHandler,// Quadrature Encoder 0IntDefaultHandler,// ADC Sequence 0IntDefaultHandler,// ADC Sequence 1IntDefaultHandler,// ADC Sequence 2IntDefaultHandler,// ADC Sequence 3IntDefaultHandler,// Watchdog timerIntDefaultHandler,// Timer 0 subtimer AIntDefaultHandler,// Timer 0 subtimer BIntDefaultHandler,// Timer 1 subtimer AIntDefaultHandler,// Timer 1 subtimer BIntDefaultHandler,// Timer 2 subtimer AIntDefaultHandler,// Timer 2 subtimer BIntDefaultHandler,// Analog Comparator 0IntDefaultHandler,// Analog Comparator 1IntDefaultHandler,// Analog Comparator 2IntDefaultHandler,// System Control (PLL, OSC, BO)IntDefaultHandler,// FLASH ControlIntDefaultHandler,// GPIO Port FIntDefaultHandler,// GPIO Port GIntDefaultHandler,// GPIO Port HIntDefaultHandler,// UART2 Rx and TxIntDefaultHandler,// SSI1 Rx and TxIntDefaultHandler,// Timer 3 subtimer AIntDefaultHandler,// Timer 3 subtimer BIntDefaultHandler,// I2C1 Master and SlaveIntDefaultHandler,// CAN0IntDefaultHandler,// CAN1lwIPEthernetIntHandler,// EthernetIntDefaultHandler,// HibernateIntDefaultHandler,// USB0IntDefaultHandler,// PWM Generator 3IntDefaultHandler,// uDMA Software TransferIntDefaultHandler,// uDMA ErrorIntDefaultHandler,// ADC1 Sequence 0IntDefaultHandler,// ADC1 Sequence 1IntDefaultHandler,// ADC1 Sequence 2IntDefaultHandler,// ADC1 Sequence 3IntDefaultHandler,// External Bus Interface 0IntDefaultHandler,// GPIO Port JIntDefaultHandler,// GPIO Port KIntDefaultHandler,// GPIO Port LIntDefaultHandler,// SSI2 Rx and TxIntDefaultHandler,// SSI3 Rx and TxIntDefaultHandler,// UART3 Rx and TxIntDefaultHandler,// UART4 Rx and TxIntDefaultHandler,// UART5 Rx and TxIntDefaultHandler,// UART6 Rx and TxIntDefaultHandler,// UART7 Rx and TxIntDefaultHandler,// I2C2 Master and SlaveIntDefaultHandler,// I2C3 Master and SlaveIntDefaultHandler,// Timer 4 subtimer AIntDefaultHandler,// Timer 4 subtimer BIntDefaultHandler,// Timer 5 subtimer AIntDefaultHandler,// Timer 5 subtimer BIntDefaultHandler,// FPU0,// Reserved0,// ReservedIntDefaultHandler,// I2C4 Master and SlaveIntDefaultHandler,// I2C5 Master and SlaveIntDefaultHandler,// GPIO Port MIntDefaultHandler,// GPIO Port N0,// ReservedIntDefaultHandler,// TamperIntDefaultHandler,// GPIO Port P (Summary or P0)IntDefaultHandler,// GPIO Port P1IntDefaultHandler,// GPIO Port P2IntDefaultHandler,// GPIO Port P3IntDefaultHandler,// GPIO Port P4IntDefaultHandler,// GPIO Port P5IntDefaultHandler,// GPIO Port P6IntDefaultHandler,// GPIO Port P7IntDefaultHandler,// GPIO Port Q (Summary or Q0)IntDefaultHandler,// GPIO Port Q1IntDefaultHandler,// GPIO Port Q2IntDefaultHandler,// GPIO Port Q3IntDefaultHandler,// GPIO Port Q4IntDefaultHandler,// GPIO Port Q5IntDefaultHandler,// GPIO Port Q6IntDefaultHandler,// GPIO Port Q7IntDefaultHandler,// GPIO Port RIntDefaultHandler,// GPIO Port SIntDefaultHandler,// SHA/MD5 0IntDefaultHandler,// AES 0IntDefaultHandler,// DES3DES 0IntDefaultHandler,// LCD Controller 0IntDefaultHandler,// Timer 6 subtimer AIntDefaultHandler,// Timer 6 subtimer BIntDefaultHandler,// Timer 7 subtimer AIntDefaultHandler,// Timer 7 subtimer BIntDefaultHandler,// I2C6 Master and SlaveIntDefaultHandler,// I2C7 Master and SlaveIntDefaultHandler,// HIM Scan Matrix Keyboard 0IntDefaultHandler,// One Wire 0IntDefaultHandler,// HIM PS/2 0IntDefaultHandler,// HIM LED Sequencer 0IntDefaultHandler,// HIM Consumer IR 0IntDefaultHandler,// I2C8 Master and SlaveIntDefaultHandler,// I2C9 Master and SlaveIntDefaultHandler// GPIO Port T
};//*****************************************************************************
//
// This is the code that gets called when the processor first starts execution
// following a reset event.Only the absolutely necessary set is performed,
// after which the application supplied entry() routine is called.Any fancy
// actions (such as making decisions based on the reset cause register, and
// resetting the bits in that register) are left solely in the hands of the
// application.
//
//*****************************************************************************
void
ResetISR(void)
{//// Jump to the CCS C initialization routine.This will enable the// floating-point unit as well, so that does not need to be done here.//__asm(".global _c_int00\n""b.w_c_int00");
}//*****************************************************************************
//
// This is the code that gets called when the processor receives a NMI.This
// simply enters an infinite loop, preserving the system state for examination
// by a debugger.
//
//*****************************************************************************
static void
NmiSR(void)
{//// Enter an infinite loop.//while(1){}
}//*****************************************************************************
//
// This is the code that gets called when the processor receives a fault
// interrupt.This simply enters an infinite loop, preserving the system state
// for examination by a debugger.
//
//*****************************************************************************
static void
FaultISR(void)
{//// Enter an infinite loop.//while(1){}
}//*****************************************************************************
//
// This is the code that gets called when the processor receives an unexpected
// interrupt.This simply enters an infinite loop, preserving the system state
// for examination by a debugger.
//
//*****************************************************************************
static void
IntDefaultHandler(void)
{//// Go into an infinite loop.//while(1){}
}
奋斗的我们:

回复 xyz549040622:

你好,苦行僧

      在不带bootloader的例程中有串口3的中断入口;但是在bootloader例程中没有串口3的中断入口。我自己在后面补充了中断入口,但是不能工作。

 

 

xyz549040622:

回复 奋斗的我们:

你补充的是哪个启动文件呢?如果想用串口3的话,用自带的bootloader函数好像是不支持的,测试的是哪个例程呢?

赞(0)
未经允许不得转载:TI中文支持网 » TM4C129NCPDT 在Bootloader中UART3串口不能中断
分享到: 更多 (0)