svdoshi 0 Posted January 14, 2015 Share Posted January 14, 2015 Hey Guys, I am new user of Energia. Currently, I am using MSP430G2553 chip to write data in SD card. I found code that works on USCIB0 SPI communication. Here is the link for the code. This code works completely fine. But, I wanted to know how can I change the code to use USCIA0 SPI instead of USCIB0 to do this? I tried going into pins_energia.h and just changing the pins. But it didn't work. Can anybody help me with this problem? Here is port assignment for different SPI buses USCIB0: (Code is using it) P1.6 -> master in slave out (MISO) P1.7 -> master out slave in (MOSI) P1.4 -> slave transit enable P1.5 -> clock input USCIA0: (This is what we want to use) P1.1 -> master in slave out (MISO) P1.2 -> master out slave in (MOSI) P1.5 -> slave transit enable P1.4 -> clock input Quote Link to post Share on other sites
spirilis 1,265 Posted January 14, 2015 Share Posted January 14, 2015 SPI library's own code needs to change to reference UCA0xxxx registers instead. It's a bit messy. Quote Link to post Share on other sites
svdoshi 0 Posted January 14, 2015 Author Share Posted January 14, 2015 Ohh ok. SPI libraries means SPI.h and usci_spi.cpp? Do you think it's possible tho? Quote Link to post Share on other sites
spirilis 1,265 Posted January 14, 2015 Share Posted January 14, 2015 Oh yeah it's possible. You'll have to maintain your own version of the SPI library across future revisions of Energia, etc. to use it. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.