请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TMS320F28335 主题中讨论的其他器件:C2000WARE
您好:
我使用的演示代码为"F:\c2000_sdk\C2000Ware_1_00_03_00\device_support\F2833x\examples\McBSP_loopback_DMA"。 我将 McBSP_SPI 模式从 DLB 更改为时钟停止模式。 SPI 的 CLK 为400kHz。
我想使用 MCBSPB 作为 SPI 模式来与 SD 卡通信。 下面是我的配置。
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void InitMcbspbGpio(void)
{
EALLOW;
// Configure McBSP-A pins using GPIO regs
// This specifies which of the possible GPIO pins will be McBSP functional
// pins.
// Comment out other unwanted lines.
GpioCtrlRegs.GPAMUX1.bit.GPIO12 = 3; // GPIO12 is MDXB pin MOSI
GpioCtrlRegs.GPAMUX1.bit.GPIO13 = 3; // GPIO13 is MDRB pin MISO
GpioCtrlRegs.GPAMUX1.bit.GPIO14 = 3; // GPIO14 is MCLKXB pin CLK
GpioCtrlRegs.GPAMUX1.bit.GPIO15 = 3; // GPIO15 is MFSXB pin
// Enable internal pull-up for the selected pins
// Pull-ups can be enabled or disabled by the user.
// This will enable the pullups for the specified pins.
// Comment out other unwanted lines.
GpioCtrlRegs.GPAPUD.bit.GPIO12 = 0; //Enable pull-up on GPIO12 (MDXB)
GpioCtrlRegs.GPAPUD.bit.GPIO13 = 0; //Enable pull-up on GPIO13 (MDRB)
GpioCtrlRegs.GPAPUD.bit.GPIO14 = 0; //Enable pull-up on GPIO14 (MCLKXB)
GpioCtrlRegs.GPAPUD.bit.GPIO15 = 0; //Enable pull-up on GPIO15 (MFSXB)
我需要使用400kHz CLK 来发送 cmd 来初始化 SD 卡。 但是、不管我在"DXR1"中发送什么、接收寄存器"DRR1"将始终为0xFF。
我的 McBSP 配置是否有任何问题?
顺便说一下、由于硬接线电路是固定的、我无法执行回路测试。 此外、我已禁用 TX 和 Rx 中断、这很重要吗?