TI_Trey 38 Posted September 12, 2012 Share Posted September 12, 2012 Replace your common directory with this Import the driverlib project from this directory Build the driverlib project Rebuild the SPI example with the code posted above The example should work now. f2802x_common.zip timotet 1 Quote Link to post Share on other sites
CorB 64 Posted September 12, 2012 Author Share Posted September 12, 2012 (edited) Hi Trey, I will wait for others to test the SPI module, FIFO isnt necessary for this application. COr Edited September 12, 2012 by CorB Quote Link to post Share on other sites
CorB 64 Posted September 16, 2012 Author Share Posted September 16, 2012 Hello, I had to try once more ... could not stop myself. But again pure failure, the builtin SPI does not work. Ive used the code below to set the SPI up and rewritten the SPI_WRITE part in the LCD too. The oddest part in using this code is that the LEDs are starting to blink as if I see the SPI transfer passing via the LEDs. Thats odd since the Leds are on complete different GPIOlines. Unfortunately I have not see 1 simple working example of anybody using the SPI on the C2K launchpad ... **** initialize SPI GPIO_setPullUp(myGpio, GPIO_Number_16, GPIO_PullUp_Enable); GPIO_setPullUp(myGpio, GPIO_Number_17, GPIO_PullUp_Enable); GPIO_setPullUp(myGpio, GPIO_Number_18, GPIO_PullUp_Enable); GPIO_setPullUp(myGpio, GPIO_Number_19, GPIO_PullUp_Enable); GPIO_setQualification(myGpio, GPIO_Number_16, GPIO_Qual_ASync); GPIO_setQualification(myGpio, GPIO_Number_17, GPIO_Qual_ASync); GPIO_setQualification(myGpio, GPIO_Number_18, GPIO_Qual_ASync); GPIO_setQualification(myGpio, GPIO_Number_19, GPIO_Qual_ASync); GPIO_setMode(myGpio, GPIO_Number_16, GPIO_16_Mode_SPISIMOA); GPIO_setMode(myGpio, GPIO_Number_17, GPIO_17_Mode_SPISOMIA); GPIO_setMode(myGpio, GPIO_Number_18, GPIO_18_Mode_SPICLKA); GPIO_setMode(myGpio, GPIO_Number_19, GPIO_19_Mode_SPISTEA_NOT); CLK_enableSpiaClock(myClk); // Reset on, rising edge, 8-bit char bits SPI_setCharLength(mySpi, SPI_CharLength_9_Bits); // Enable master mode, normal phase, // enable talk, and SPI int disabled. SPI_setMode(mySpi, SPI_Mode_Master); SPI_enableTx(mySpi); SPI_setBaudRate(mySpi, 0x63); // Relinquish SPI from Reset SPI_enable(mySpi); // Set so breakpoints don't disturb xmission SPI_setPriority(mySpi, SPI_Priority_FreeRun); ****** void SPIWrite(uint16_t command, uint16_t data) { uint16_t spidata; char bits; spidata = command<<15; spidata = spidata | data <<7; CSLOW; SpiaRegs.SPICTL.bit.TALK = 1; // Enable Transmit path SpiaRegs.SPITXBUF = spidata; // Master transmits data CSHIGH; } Quote Link to post Share on other sites
SugarAddict 227 Posted October 7, 2012 Share Posted October 7, 2012 Been trying for a while today with the $4.30 lcd booster... no love at all... Quote Link to post Share on other sites
CorB 64 Posted October 8, 2012 Author Share Posted October 8, 2012 Hi SA, I have got it working without problems on SW SPI, I have shared the code in another topic on this forum.http://www.forum.c2kcentral.com/topic/125-glcd-on-c2k-launchpad/#entry645 Cor Quote Link to post Share on other sites
SugarAddict 227 Posted October 8, 2012 Share Posted October 8, 2012 Aye, but not the HW that should work, that's what I was trying to get. Quote Link to post Share on other sites
CorB 64 Posted October 8, 2012 Author Share Posted October 8, 2012 Ah ... I have given up hope on that one myself. Maybe RobG will give it a try, on the stellarisforum he at least suggested to give HW SPI a try both on C2K and on Stellaris. If he also doesnt ... I wonder where the real problem resides. cheers CorB Quote Link to post Share on other sites
TI_Trey 38 Posted October 8, 2012 Share Posted October 8, 2012 (edited) I'd really like to see this working on the hardware SPI. I suppose I should just go order a board and give this a shot myself. EDIT: LCD and SD card boosterpacks ordered...I'll get to the bottom of this one way or another... Edited October 8, 2012 by TI_Trey Automate 1 Quote Link to post Share on other sites
SugarAddict 227 Posted October 8, 2012 Share Posted October 8, 2012 Was gonna say... I'll send you one of the 4.30 lcd's I did for free... Still got a couple spare Quote Link to post Share on other sites
msptest6 0 Posted October 8, 2012 Share Posted October 8, 2012 Was gonna say... I'll send you one of the 4.30 lcd's I did for free... Still got a couple spare I'd really like to see this working on the hardware SPI. I suppose I should just go order a board and give this a shot myself. EDIT: LCD and SD card boosterpacks ordered...I'll get to the bottom of this one way or another... I can send him one in his order. I have 2 left. But I think, Trey is trying to get Lar's booster to work. Trey? Quote Link to post Share on other sites
TI_Trey 38 Posted October 9, 2012 Share Posted October 9, 2012 Ya I was gonna try to get Lar's LCD working on hardware SPI. I also ordered a SD card booster...Blue, I'll race you to see who can get FatFS running first Quote Link to post Share on other sites
msptest6 0 Posted October 9, 2012 Share Posted October 9, 2012 Ya I was gonna try to get Lar's LCD working on hardware SPI. I also ordered a SD card booster...Blue, I'll race you to see who can get FatFS running first Ok.. I'll try this weekend Quote Link to post Share on other sites
abhed 0 Posted November 6, 2012 Share Posted November 6, 2012 Team, I am trying to interface the Anaren Value line booster pack with C2000 launchpad. Kindly find the code attached and suggest what am i doing wrong in this. The connections are as below: RF Booster Pack C2000 LaunchPad Jumper Pin No Designation Function Jumper Pin No Designation Function J1 1 Vdd Power J1 1 Vdd Power 2 P1.0 GDO2 2 ADCINA6 GDO2 3 P1.1 Alt GDO0 3 GPIO28 4 P1.2 Alt CSN 4 GPIO29 5 P1.3 Alt GDO0 5 GPIO34 6 P1.4 Alt CSN 6 ADCINA4 7 P1.5 SCLK 7 GPIO18 SPICLK 8 P2.0 NC 8 ADCINA2 9 P2.1 NC 9 IDCINB2 10 P2.2 NC 10 ADCINB4 J2 1 GND GND J2 1 GND 2 XIN GDO0 2 GPIO19 SPISTEA 3 XOUT CSn 3 GPIO12 Switch 4 SBWTCK NC 4 NC 5 RST NC 5 RESET 6 P1.7 MOSI 6 GPIO16 MOSI 7 P1.6 MISO 7 GPIO17 MISO 8 P2.5 NC 8 GPIO6 GDO0 9 P2.4 NC 9 GPIO7 10 P2.3 NC 10 ADCINB6 Using GPIO6 as slave interrupt. Regards Abhed Quote Link to post Share on other sites
CorB 64 Posted November 6, 2012 Author Share Posted November 6, 2012 Hi Abhed, Your code was not attached and the connections are also not clearly visible ... something must have gone wrong regards CorB Quote Link to post Share on other sites
abhed 0 Posted November 7, 2012 Share Posted November 7, 2012 I have started the blog of Hardware SPI on C2000 launch Pad. Please take a look on the same. It has the code and connections image attached. Awaiting your kind feedback on the same. Abhed 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.