板卡: MSP432P401R
因为 从设备需求,需要将MSP432 SPI 输出 clk的空闲电平为高电平, CS 空闲电平为高电平, MOSI 空闲电平为高电平, MISO空闲电平为低电平。
但我现在可以配置clk的空闲电平为高电平, CS 空闲电平为高电平。 但 MOSI 和 MISO一直为低电平。
请问该如何配置MOSI的空闲电平为高电平?? 我的SPI初始化配置如下所示:
void SR_SPI_Init(void){
volatile uint32_t delay;
EUSCI_A3->CTLW0 = 0x0001; // hold the eUSCI module in reset mode
EUSCI_A3->CTLW0 = 0x6D83;
EUSCI_A3->BRW = 10000; //8 -- 1500kHz
EUSCI_A3->MCTLW = 0;
P9->SEL0 |= 0xF0;
P9->SEL1 &= ~0xF0; // configure P9.7, P9.6, P9.5, and P9.4 as primary module function
EUSCI_A3->CTLW0 &= ~0x0001; // enable eUSCI module
EUSCI_A3->IE &= ~0x0003; // disable interrupts
}