Hi. I am trying to get the CC2540 able to communicate with an arduino, and for that I need SPI communication.
I have looked at various posts on this forum, but they didn't really help me much. The biggest breadcrumb was this thread
http://e2e.ti.com/support/low_power_rf/f/538/t/105727.aspx
It seems fairly straightforward the way the code works, but I can't figure out how to find the right pins. I am currently using the CC2540 on an OLP425 breakout board from ConnectBlue. The relevant pin layout is here:
http://support.connectblue.com/display/PRODBTSPA/cB-OLx425+Electrical+Mechanical+Data+Sheet#cB-OLx425ElectricalMechanicalDataSheet-PinDescription
To save you some reading, here it states that the uart pins I aim to use are:
CC2540 pin 14 / Port name P0_5 = SPI-CLK
CC2540 pin 15 / Port name P0_4 = SPI-CS
CC2540 pin 16 / Port name P0_3 = SPI-MOSI
CC2540 pin 17 / Port name P0_2 = SPI-MISO
So the way I figure, I need to configure my modified version of the cma3000d.c file, to use other registers. I spent some time reading about SPI on wikipedia, so i know the purpose of those 4 wire types.
I tried looking in the CC2540 Users guide, section 7.11 to try and understand this, but it didn't help me much unfortunately.
So my question is: how do i modify for example accInit to fit my pin selection? Furthermore to understand that, how do I know what values to set in PERCFG, P1SEL, etc. ?
Best Regards
Jesper Hoff