Jump to content
43oh

Energia SPI Speed Consistency


Recommended Posts

SPI provides different speeds on LaunchPad and StellarPad for Energia:

 

#if defined(__MSP430G2553__)
    SPI.begin();
    SPI.setClockDivider(SPI_CLOCK_DIV2); // for MSP430G2553 DIV2 = 8 MHz
#elif defined(__LM4F120H5QR__)
    SPI.begin(2);
    SPI.setClockDivider(SPI_CLOCK_DIV2); // for LM4F120H5QR DIV2 = 4 MHz !
#endif

Please find the traces with my just-purchased oscilloscope thanks to http://embeddedcomputing.weebly.com/2/post/2012/11/oscilloscope-target-reached.html'>contributions I've received!

 

8298346968_79e0c195e3.jpg 8298345992_e8bcc9e05b.jpg

 

Left: MSP430G2253 = 8 MHz; Right: LM4F210H5QR = 4 MHz

 

 

Line 119 of Energia / hardware / lm4f / libraries / SPI / SPI.cpp seems to be limited at 4 MHz:


ROM_SSIConfigSetExpClk(SSIBASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0, SSI_MODE_MASTER, 4000000, 8); 
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...