在线时间8 小时
UID3908603
注册时间2023-3-24
NXP金币71
该用户从未签到
注册会员

- 积分
- 120
- 最后登录
- 2025-6-26
|
发表于 2023-4-25 11:46:55
|
显示全部楼层
void main(void)
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
//set up the GPIOF4(GPIOF4/TXD1/XB_OUT4) as peripheral
SIM_PCE0|=0x02; //enable GPIOF clock
GPIOF_PER|=0x10; //configure GPOIOF4 as peripheral
SIM_GPSFL&=0xFEFF; //clear F4 bit so that GPIOF4 is TXD1 pin
//initialize DMA and Sci
#if 0
DMA_REQC|=800000; //clear the DMA1
DMA_REQC=0x0000;
DMA_SAR1=((long)&message[0]);
DMA_DAR1=((long)FFQSCI1_DATA)<<1;
#endif
//enable transmitter DMA
QSCI1_CTRL1|=0x04; //enable Transmitter
QSCI1_CTRL2|=0x02; //set TDE to enable transmitter DMA
//enable Sci by setting the TE bit
// DMA_DCR0|=0x40000000; //set the REQ bit to enable DMA
AS1_SendChar(message[0]);
for(;;) {}
} |
|