HI.
I'm having a bachelor project which involves working with the TI cc2540 keyfob.
My project contains of getting the CC2540 to communicate with a Android Phone (Going for the MOTO RAZR)
Since setting this up isn't straight forward, i'm going slowly forward to try to understand the whole consept of the CC2540 is working.
I have successfully managed to get the sample-project of Heart Rate provided by TI, and sending the dummy heart rate to the RAZR, and now i want to try to get the CC2540 to send data through an Arduino 2560 with UART, and monitoring what the Arduino gets from the CC2540 Keyfob.
I'm using the UART1 configuration, which RX/TX should be on pin P0_5/P0_4 to the DEBUGGER pins if i'm not to wrong. :)
The Sample-code i have used is the SimpleBLEPeripheral.
On the Arduino side i use a simple code which should read on RX3 on the Arduino.
The Arduino code looks like this:
void setup() { } void loop() void serialEvent3() |
Now this is the part where i'm very unsecure on the procedure.
I have tried to configure the code in SimpleBlePeripheral_Main.C.
The code that i think should work is something like this, but when i try to monitor over the Arduino i get no respone/data from the CC2540 Keyfob.
int main(void) // Initialize board I/O /* Initialze the HAL driver */ /* Initialize NV system */ /* Initialize LL */ /* Initialize the operating system */ halUARTCfg_t config; config.configured = true; config.baudRate = HAL_UART_BR_57600; /* config.flowControlThreshold = 64; config.idleTimeout = 6; config.rx.maxBufSize = 128; config.tx.maxBufSize = 128; config.intEnable = true; uint8 NAVN[31] = { uint16 LOGONAVN = HalUARTWrite (HAL_UART_PORT_1, NAVN, 7); CODE ETC --> |
If anyone have suggestions it would be much appreciated.
Michael.