Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 21927

MSP430F249 and SPI communication

$
0
0

Good afternoon,

I want to write and read for a SRAM memory (23LC1024) to 16 MHz SPI by using the MSP430F249. However, the maximum transmission rate that I am able to obtain is 8 MHz.

Can you help me with this problem?

SPI 8 MHz configuration (is functioning well):

P3DIR |= 0x01;
P3OUT |= 0x01;
P3SEL |= 0x0E;

UCB0CTL1 |= UCSWRST;
UCB0CTL0 |= UCCKPH + UCMSB + UCMST + UCMODE_0 + UCSYNC;
UCB0CTL0 &= ~UCCKPL; 
UCB0CTL0 &= ~UC7BIT;
UCB0CTL1 |= UCSSEL_1;
UCB0BR0 |= 0x02; //16MHz / 2 = 8MHz
UCB0BR1 = 0;
UCB0CTL1 &= ~UCSWRST; 

Timing chart:


SPI 16 MHz configuration (is failing):

P3DIR |= 0x01; 
P3OUT |= 0x01;
P3SEL |= 0x0E;

UCB0CTL1 |= UCSWRST;
UCB0CTL0 |= UCCKPH + UCMSB + UCMST + UCMODE_0 + UCSYNC;
UCB0CTL0 &= ~UCCKPL; 
UCB0CTL0 &= ~UC7BIT;
UCB0CTL1 |= UCSSEL_1; 
UCB0BR0 |= 0x01; //16MHz
UCB0BR1 = 0; 
UCB0CTL1 &= ~UCSWRST; 


Viewing all articles
Browse latest Browse all 21927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>