This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SPI ERROR WITH TIVA-C AND CC2530 AIR MODULE

Other Parts Discussed in Thread: CC2530, ENERGIA

hello People !! I have traying to upload this code (see below) in Tiva C LP with CC2530 AIR MODULE. I have this errors, someone gives me some help please. " I have libreries in order and all".

Zigbee codes and frequency measurements, work great separately, but when I try to put them together (look at code) it gives me the following error.

C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp: In member function 'void SPIClass::begin()':
C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp:207:55: error: invalid conversion from 'long unsigned int*' to 'uint32_t* {aka unsigned int*}' [-fpermissive]
  while(ROM_SSIDataGetNonBlocking(SSIBASE, &initialData));
                                                       ^
C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp: In member function 'uint8_t SPIClass::transfer(uint8_t)':
C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp:244:35: error: invalid conversion from 'long unsigned int*' to 'uint32_t* {aka unsigned int*}' [-fpermissive]
  ROM_SSIDataGet(SSIBASE, &rxtxData);
                                   ^

my code is: 

#include <stdint.h>
#include <stdbool.h>
#include <ZigBee.h>
#include <SPI.h>

#define PART_TM4C123GH6PM
#include "inc/tm4c123gh6pm.h"

/*****************************
* LM4F120 - timer0 
* Using TimerIntRegister
* 80 Mhz clock
*****************************/

#include "inc/hw_ints.h"
#include "driverlib/interrupt.h"
#include "driverlib/sysctl.h"
#include "driverlib/timer.h"

int timer;
void initTimer()
{ 
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
ROM_TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC); // 32 bits Timer
TimerIntRegister(TIMER0_BASE, TIMER_A, Timer0Isr); // Registering isr 
ROM_TimerEnable(TIMER0_BASE, TIMER_A); 
ROM_IntEnable(INT_TIMER0A); 
ROM_TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT); 
}

void Timer0Isr(void)
{
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT); // Clear the timer interrupt
timer = TimerValueGet(TIMER0_BASE,TIMER_A); 
digitalWrite(GREEN_LED, digitalRead(GREEN_LED) ^ 1); // toggle LED pin
}


void printNetwork(int connectStatus){
if(connectStatus==SUCCESS){
Serial.println("Success!");
Serial.print("Connected to: PanID: 0x");
Serial.print(ZigBee.panId(),HEX);
Serial.print(", Channel: 0x");
Serial.print(ZigBee.channel(),HEX);
Serial.print(", Address: 0x");
Serial.println(ZigBee.address(),HEX);
}
else{
Serial.print("Error: 0x");
Serial.println(connectStatus,HEX);
}
}

void setup()
{
Serial.begin(115200);
// Serial.print("Coordinator: Initializing Network...");
printNetwork(ZigBee.begin(COORDINATOR));
pinMode(GREEN_LED,OUTPUT);
initTimer();
}

void loop()
{
if(ZigBee.connected()){ // check if network joined
if (ZigBee.receive()){
if (ZigBee.received(TYPE)==DEVICE_ANNOUNCE){
Serial.print("Device Announce From: 0x");
Serial.println(ZigBee.address(FROM),HEX);
}
else if (ZigBee.received(TYPE)==INCOMING_DATA){
for (int i=0;i<80;i++){
Serial.print("-");
}

Serial.println(ZigBee.address(FROM),HEX);
Serial.println();
Serial.print("Count: ");
ZigBee.printlnTo(Serial,UINT8);

Serial.print("Voltage: ");
int16_t voltage = ZigBee.read(INT16);
Serial.print(voltage/1000);
Serial.print(".");
Serial.print((voltage%1000)/100);
Serial.print((voltage%100)/10);
Serial.print((voltage%10));
Serial.println("V");

Serial.print("Temperature: ");
int16_t temperature= ZigBee.read(INT16);
Serial.print(temperature/10);
Serial.print(".");
Serial.print(temperature%10);
Serial.println('C'); 
}
}
} 
else {
Serial.print("Disconnected...Restarting...");
printNetwork(ZigBee.begin(COORDINATOR));
}

int reloj= SysCtlClockGet();
ROM_TimerLoadSet(TIMER0_BASE, TIMER_A,10000000); // ulPeriod-1
float freq = (10000000-timer-8161024);

if (freq<0)
freq=0.0;
else
freq=freq; 
Serial.println("While timer is running ..."); 
while (1)
{
Serial.print(freq);Serial.print(" ");
Serial.print(timer);Serial.print(" "); 
Serial.print(reloj);Serial.println(" ");
delay(1000);
}
}

 I can not find errors in my code (attached above).

thanks for your reply :).