zigbee cc2530 bootloader serial boot
when i use cc2530 bootloader , i ....发现了一个问题不是很理解。
我们开始是先是初始化UART ISR
static void sblInit(void)
{
halUARTCfg_t uartConfig;
/* This is in place of calling HalDmaInit() which would require init of the other 4 DMA
* descriptors in addition to just Channel 0.
*/
HAL_DMA_SET_ADDR_DESC0(&dmaCh0);
HalUARTInitISR();
uartConfig.configured = TRUE;
uartConfig.baudRate = HAL_UART_BR_115200;
uartConfig.flowControl = FALSE;
uartConfig.flowControlThreshold = 0; // CC2530 by #define - see hal_board_cfg.h
uartConfig.rx.maxBufSize = 0; // CC2530 by #define - see hal_board_cfg.h
uartConfig.tx.maxBufSize = 0; // CC2530 by #define - see hal_board_cfg.h
uartConfig.idleTimeout = 0; // CC2530 by #define - see hal_board_cfg.h
uartConfig.intEnable = TRUE;
uartConfig.callBackFunc = NULL;
HalUARTOpenISR(&uartConfig);
SB_INIT_LEDS();
}
然后比如我们要send 一个 halo 到串口,SB_TX("halo", 5);,此函数调用HalUARTWriteISR(uint8 *buf, uint16 len);把"halo"写到isrCfg.txBuf[]里,然后HalUARTPollISR()的时候,调用halUartTxIsr();把isrCfg.txBuf[]里的内容一个个写到UxDBUF里。so........ 我并没有看到有定义#pragma vector = UTX0_VECTOR __interrupt void halUart0TxIsr(void){}的地方。还是我对中断理解的有误。
发送直接拷贝到寄存器,不需要中断处理函数。