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

LAUNCHXL-CC1310: SPI 发送与接收COUNT 会影响CS的波形

Part Number:LAUNCHXL-CC1310Other Parts Discussed in Thread:CC1310

当COUNT数小于等于9时,CS信号会在每一个字节后拉高;大于9时,CS信号会在整个周期拉低,结束后拉高。

count=9:

SPI_init();  // Initialize the SPI driverGPIO_init();GPIO_setConfig(Board_SPI_SLAVE_READY, GPIO_CFG_IN_PD | GPIO_CFG_IN_INT_RISING);/* install Button callback */GPIO_setCallback(Board_SPI_SLAVE_READY, gpioButtonFxn0);/* Enable interrupts */GPIO_enableInt(Board_SPI_SLAVE_READY);SPI_Params_init(&spiParams);  // Initialize SPI parametersspiParams.transferMode = SPI_MODE_BLOCKING;  //spiParams.dataSize = 8;// 8-bit data sizespiParams.mode = SPI_MASTER;  //SPI MASTERspiParams.frameFormat = SPI_POL0_PHA1;  //SPI POL0 PHA0spiParams.bitRate = 4000000;  //4MHZspi = SPI_open(Board_SPI0, &spiParams);if (spi == NULL) {while (1);  // SPI_open() failed}while(1){spiTransaction.count = 9;spiTransaction.txBuf = (void *)transmitBuffer;spiTransaction.rxBuf = (void *)receiveBuffer1;SPI_transfer(spi,&spiTransaction);sleep(1);}

count=10:

SPI_init();  // Initialize the SPI driverGPIO_init();GPIO_setConfig(Board_SPI_SLAVE_READY, GPIO_CFG_IN_PD | GPIO_CFG_IN_INT_RISING);/* install Button callback */GPIO_setCallback(Board_SPI_SLAVE_READY, gpioButtonFxn0);/* Enable interrupts */GPIO_enableInt(Board_SPI_SLAVE_READY);SPI_Params_init(&spiParams);  // Initialize SPI parametersspiParams.transferMode = SPI_MODE_BLOCKING;  //spiParams.dataSize = 8;// 8-bit data sizespiParams.mode = SPI_MASTER;  //SPI MASTERspiParams.frameFormat = SPI_POL0_PHA1;  //SPI POL0 PHA0spiParams.bitRate = 4000000;  //4MHZspi = SPI_open(Board_SPI0, &spiParams);if (spi == NULL) {while (1);  // SPI_open() failed}while(1){spiTransaction.count = 10;spiTransaction.txBuf = (void *)transmitBuffer;spiTransaction.rxBuf = (void *)receiveBuffer1;SPI_transfer(spi,&spiTransaction);sleep(1);}

Cherry Zhou:

您好,我们已收到您的问题并升级到英文论坛寻求帮助,如有答复将尽快回复您。谢谢!

,

Cherry Zhou:

您好,默认情况下minDmaTransferSize 设置为 10,意味着当发送 10 个或更多字节时将使用 DMA,并且在字节之间不会将 CSN 拉高。

对于 9 个或更少的字节,不使用 DMA,并且每个字节的 CSN 都被拉高。

您可以在 CC1310_LAUNCHXL.c 中更改 minDmaTransferSize。

,

yuan jiadong:

好的,谢谢

赞(0)
未经允许不得转载:TI中文支持网 » LAUNCHXL-CC1310: SPI 发送与接收COUNT 会影响CS的波形
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1