Part Number: MSP430FR2355 Tool/software: Code Composer Studio Hi, I'm pretty new to the MSP430. I'm now trying to connect the MSP430fr2355 with RFM95. This the RF datasheet: https://www.mouser.com/ds/2/761/sx1276-944191.pdf I'm trying to use the continuous mode for FSK. In page 70 of RF datasheet, there are two pictures. I use two SPI interface, one for normal SPI(MSP: Master), the second one for DIO1&2(MSP: Slaver). The datasheet points out that in order to send a package, MCU needs to directly send data through the DIO2. So I set the P4.7(SOMI) to connect DIO2 and send data, but it seems not to work. And I find that the data is in NRZ format. I wonder if this matter. The T_DATA time is 250ns. Does that mean I need to keep SOMI pin to keep 500ns send one bit? If anyone can help me, I'll be so grateful. Thank you. Below is the code I build for two SPI --------------------------------------------------------------- void si1 (void) { P1DIR |= BIT4; P1OUT |= BIT4; // NSS P1SEL0 |= BIT5; P1DIR |= BIT5; // SCK P1SEL0 |= BIT7; P1DIR |= BIT7; // MOSI P1SEL0 |= BIT6; P1DIR &= ~BIT6; // MISO UCA0CTLW0 |= UCSWRST; UCA0MCTLW = 0x00; UCA0CTLW0 |= UCMST_1|UCSYNC|UCCKPH|UCMSB|UCMODE_0; UCA0CTLW0 |= UCSSEL__SMCLK; UCA0BR0 |= 0x01; UCA0BR1 |= 0x00; UCA0CTLW0 &= ~UCSWRST; } void si2 (void) // MSP430 is Slave { P4SEL0 |= BIT5; P4DIR &= ~BIT5; // SCK P4SEL0 |= BIT7; P4DIR |= BIT7; // SOMI UCB1CTLW0 |= UCSWRST; UCB1CTLW0 |= UCMST_0|UCSYNC|UCCKPH_0|UCMSB|UCMODE_0; // Slave Mode UCB1BR0 |= 0x01; UCB1BR1 |= 0x00; UCB1CTLW0 &= ~UCSWRST; }
↧