Jump to content
Forum sending old emails Read more... ×

SPI clock speed and bit format

Recommended Posts

Hi All,

I am new to msp430 world, so far i have done many projects with mbed (LPC1768,KL25Z and K64F). I liked mbed as it is so easy to use, however to make cost efficent and low power products i am now trying to learn msp430. 

I want to interface msp430g2553 with cc1101 transceivers. I have done the basic communication using mbed(like sending and receiving data). However I need some help with msp430.

I want to use msp430 as transmitter first and receive data on mbed-lpc1768. I have converted the mbed library to msp430(changed syntax where required) and managed to compile it with no errors.

However when i am calling send function it is not sending data, can anyone tell me how to set frequency to 1MHz. do I need to divide by 16 in set clock more or with 4.

Anyone who has done similar project in energia please provide some assistance.

thanks in advance,


Share this post

Link to post
Share on other sites

The 2553 runs at 16 MHz. SPI uses the SMCLK which is set to source from DCOCLK. In order to get 1MHz SPI clock you need to call SPI.setClockDivider(16) in setup().

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now