Jump to content

chillyjee

Members
  • Content Count

    4
  • Joined

  • Last visited

  1. Thank you, I installed V18 and everything is fine now !
  2. Hello guys, I have been trying to connect my MSP432R Launchpad with another device that requires 57600 bps on Serial1 and after hours trying to find an error in my code I decided to test the Serial1 port. Thus I uploaded the following test code and connected RX to TX (P3.2 <-> P3.3) : void setup() { Serial.begin(115200); Serial1.begin(115200); Serial.println("Starting..."); } void loop() { Serial1.write('A'); if (Serial1.available()) { int inByte = Serial1.read(); Serial.write(inByte); } delay(1000); } So far everything works as expected. Then I try the same code but with Serial1.begin(57600) but it won't work, I won't get any data from the Serial1 port. (I tried several other rates and it seems that only 9600bps and 115200bps were working correctly). Anyone knows about this issue ? Thanks in advance. PS : Even the back channel UART to computer Serial.begin(57600) seems broken
  3. chillyjee

    Adafruit Bluefruit LE SPI friend with MSP432

    I found the solution, the data wasn't transmitted correctly initially so there was nothing on the buffer and so the process was stuck in an available()==0 loop. I finished to code this driver completely (I think ?), here is a link for you folks : https://github.com/chillyjee/BluefruitSPI Developed for MSP432 but surely compatible with any MSP43x platform Leave any questions.
  4. Hello everyone, I am a newbie here, just received my MSP432 launchpad few days ago and I'm willing to develop a wireless bluetooth communication between my MSP432+Bluefruit LE SPI and my computer. I downloaded the librairies from Adafruit that are designed for Arduino and I think I succeeded to convert a honest part of the code for Energia. Though, I still have an important problem that stops me to go forward. Indeed the Bluefruit LE SPI dongle communicate through some commands called ATCommand, and I don't succeed to transmit those commands through the dongle. As an example this is the original Arduino code for a factory reset of the bluetooth device : /* Perform a factory reset to make sure everything is in a known state */ Serial.println(F("Performing a factory reset: ")); println("AT+FACTORYRESET"); bool isOK = ble.waitForOK(); // Bluefruit need 1 second to reboot delay(1000); // flush all left over ble.flush(); if ( ! isOK ){ error(F("Couldn't factory reset")); } In Arduino they use the println to transmit the command but in Energia I just get the "AT+FACTORYRESET" back in my Serial monitor but don't believe the device receives it. I tried to use SPI.transfer to send the message the following way but still get a failure result for the factory reset process : bool Adafruit_BLE::factoryReset(void) { char c; SPI.begin(); // println("AT+FACTORYRESET"); for (const char * p = "AT+FACTORYRESET" ; c = *p; p=p+2) { digitalWrite(18,LOW); SPI.transfer(0x10); // First Byte indicating that a COMMAND is sent according to Adafruit SDEP protocol SPI.transfer(c); // First byte of data const char * d = p+1; char e = *d; // Second byte of data SPI.transfer(e); digitalWrite(18,HIGH); } println("AT+FACTORYRESET"); bool isOK = waitForOK(); // Bluefruit need 1 second to reboot delay(1000); // flush all left over flush(); return isOK; } If anyone succeeded to connect this bluetooth dongle through SPI with MSP or has an idea of how to do it, pleeaase help me PS : It seems that this operation (like any other) is not achievable because the IRQ pin (This is the nRF51 -> Arduino 'interrupt' pin that lets the Arduino or MCU know when data is available on the nRF51, indicating that a new SPI transaction should be initiated by the Arduino/MCU) is never on HIGH. It is weird because normally after received any command message, it is supposed to turn on...
×