Kotdnz 0 Posted March 18, 2014 Share Posted March 18, 2014 I'm newbie in Energia Possible this question about SPI, but library must cover this. We connect our SPI to base_2 via command SPI.setModule(2); My example - SPI0 - ethernet, SPI2 - RFID. I read source code and can't found mechanism to separation SPI0 & SPI2. Inside all libs i found only SPI.... Think we need add to class constructor pointer to SPI_BASE. Quote Link to post Share on other sites
NickTompkins 4 Posted June 17, 2014 Share Posted June 17, 2014 We find that this doesnt quite port over well to the Connected Launchpad anyone else run into this problem? Quote Link to post Share on other sites
NickTompkins 4 Posted June 17, 2014 Share Posted June 17, 2014 Or if the Tiva C will work with this? Quote Link to post Share on other sites
NickTompkins 4 Posted June 18, 2014 Share Posted June 18, 2014 So the Tiva Seemed to work with this as far as I could tell yet the connected launchpad could not..... I think we (our little group) will be looking into possible reasons why and in hopes we might be able to tap into some of the experience here on these forums. Quote Link to post Share on other sites
OppaErich 25 Posted June 19, 2014 Share Posted June 19, 2014 https://github.com/rena2019/ This one can be adapted to Energia in like 10 minutes. It dumps the whole content of the cards. I was trying to port this to CCS with little success... Card detected. ATQA: 04 00 UID: 83 41 EB A4 SAK: 8 Sector 0: 83 41 EB A4 8D 08 04 00 62 63 64 65 66 67 68 69 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF Sector 1: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... Quote Link to post Share on other sites
NickTompkins 4 Posted June 19, 2014 Share Posted June 19, 2014 Awesome Oppa just awesome so I am still in the process to get the RC522 to work on the Connected Launchpad Quote Link to post Share on other sites
OppaErich 25 Posted June 19, 2014 Share Posted June 19, 2014 (edited) Erm, does the connected one offer SSI2 ? Ah well, it does. Did you try another SSI module ? Edited June 20, 2014 by Oppa Quote Link to post Share on other sites
OppaErich 25 Posted June 23, 2014 Share Posted June 23, 2014 I've tried with the connected one - works fine...after swapping MISO and MOSI. Quote Link to post Share on other sites
NickTompkins 4 Posted June 23, 2014 Share Posted June 23, 2014 I will give that a go. Also I wonder about having the ability to run 4 of these modules with all the different SPI ports... Quote Link to post Share on other sites
NickTompkins 4 Posted June 23, 2014 Share Posted June 23, 2014 Also on your working example what pins did you change in your code? I am having a rough go of this and I am unsure why..... Quote Link to post Share on other sites
OppaErich 25 Posted June 23, 2014 Share Posted June 23, 2014 ///////////////////////////////////////////////////////////////////// //set the pin ///////////////////////////////////////////////////////////////////// const int chipSelectPin = PD_4; const int NRSTPD = PD_5; void setup() { Serial.begin(38400); // RFID reader SOUT pin connected to Serial RX pin // start the SPI library: SPI.setModule(2); SPI.begin(); That's all I've changed. And I had to swap MISO & MOSI because there was an error in the pin description pic I used. I've zipped the sketch and library. I had to save the sketch in a different location, so you may have to shovel it to the right place. Card detected. ATQA: 04 00 UID: EB 64 D5 EC SAK: 8 Sector 0: EB 64 D5 EC B6 08 04 00 62 63 64 65 66 67 68 69 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF Sector 1: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF Sector 2: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF Sector 15: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF mfrc522.zip Quote Link to post Share on other sites
NickTompkins 4 Posted June 24, 2014 Share Posted June 24, 2014 The SPI is finally working on the connected launchpad with MOSI/MISO pin swapped. We even have multiple modules working perfect. Thank you for your help! But we haven't figured out the I2C problem yet... But that is unrelated ;-) Quote Link to post Share on other sites
minaung 0 Posted July 22, 2014 Share Posted July 22, 2014 Hello! I am also testing RC522 module. I am OK in PICC reading.The Card response it's UID. But,I want to interrupt request from IRQ pin to be good performance in my software. I am writing with C. Interrupt is not OK now.I have no idea why this happen. I write correct command to PCD. But Interrupt does not happen.what i need? Please help me? minaung 1 Quote Link to post Share on other sites
DrLou 0 Posted June 8, 2017 Share Posted June 8, 2017 OppaErich, Thanks for your great work here! I'm working to map it to an EK-TM4C129EXL - which card do you guys have this working on? Specifically, I'm hoping to connect to BoosterPack 1 connectors - which has plenty of labeled pinouts for SPI. Can you suggest a path forward? Where are the pin definitions in these projects? It appears I'd have to set const int NRSTPD = RST; - which obviously I cannot do directly. 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.