Open ahmed9207 opened 7 years ago
Hi, It seems that Energia is not using the same functions than Arduino for SPI, you should try to change them for the functions listes on this page.
thanks , i'll try it
i changed the SPI functions in hal.cpp to this
static void hal_spi_init () {
SPI.begin();
}
void hal_pin_nss (u1_t val) {
if (!val)
// SPI.beginTransaction(settings);
{
SPI.setClockDivider(SPI_CLOCK_DIV4);
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE0);
SPI.begin();
}
else
// SPI.endTransaction();
SPI.end();
//Serial.println(val?">>":"<<");
digitalWrite(lmic_pins.nss, val);
}
// perform SPI transaction with radio
u1_t hal_spi (u1_t out) {
u1_t res = SPI.transfer(out);
/*
Serial.print(">");
Serial.print(out, HEX);
Serial.print("<");
Serial.println(res, HEX);
*/
return res;
}
Now i can join the Network server however i'm not able to send any data to the gateway. Any ideas? thanks
I'm using MSP430F5529LP with RFM9x, when i compile i get the following errors:
any ideas how to solve this?