My boostxl-rs232 doesnt receive data when im trnasmitting it

hello, my current setup right now is usb converter connected with the boostxl-rs232. then my boostxl-rs232 is attached on my EK-TM4C1294XL on the boosterpack 1 slot, i need to able to send data through the rs232 and be able to capture the data on the ethernet port on my pc. however when im using the boostxl-rs232 seems like i cant send the data through, only the TX led on the usb to RS232 converter light on when im sending data, but when im not using the RS232 i able to send the data using serial for debugging, is there anything that i do wrong?

Hi NabilFikri,

A few things to check:

  1. Make sure your jumper settings are correct on the BOOSTXL-RS232. TX2 should be connected to GP3 and RX2 should be connected to GP4.
  2. Make sure you are using UART7 in your code, as that is the one which is connected to GP3 and GP4 on the booster pack and the EK-TM4C1294XL. This differs from when you are using serial debugging, which uses UART0.

From BOOSTXL-RS232 User’s Guide:

From EK-TM4C1294XL User’s Guide:

#include <Ethernet.h>
#include <EthernetUdp.h>

IPAddress ip = IPAddress(192,168,1,10); //IP for controller
IPAddress pcip = IPAddress(192,168,1,50); //IP for computer
byte mac = {0x70, 0xFF, 0x76, 0x1D, 0x72, 0x58 };//Existing MAC address for controller
unsigned int localPort = 8888;
unsigned int computerPort = 1234;
char receiveBuffer[UDP_TX_PACKET_MAX_SIZE];

EthernetUDP Udp; //Pre define funtion for UDP

void setup() {
// start the Ethernet and UDP:
Ethernet.begin(mac,ip); //Initialize function of ethernet
Udp.begin(localPort); //Initialize function of UPD

Serial.begin(9600); //Initialize serial data (RS232 function)
Serial.setModule(7);
Serial.print(“Transmitting data to “); //Show info
pcip.printTo(Serial);
Serial.print(”:1234”);
Serial.println();
}

void loop() {

String cmd; //Initialize variable for hold data from serial

while(Serial.available()>0){ //If got data from serial
cmd = Serial.readStringUntil(’\n’); //Read character until found new line
}

if(cmd != “”){ //If not empty data from serial
char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //Initialize variable for send data through ethernet
cmd.toCharArray(packetBuffer, cmd.length() + 1); //Convert string to char array
Serial.print("Tx: ");
Serial.write(packetBuffer); //Show what we sending
Serial.println();
Udp.beginPacket(pcip, computerPort); //Initialize packet for sending data
Udp.write(packetBuffer); //Sending the data
Udp.endPacket(); //End sending
}

int dataSize = Udp.parsePacket();

if(dataSize) { // Got incoming packet from ethernet

Udp.read(receiveBuffer,UDP_TX_PACKET_MAX_SIZE); // read the packet into packetBufffer
Serial.print("Rx: ");
Serial.print(receiveBuffer);      //Show in serial monitor
Serial.println();

}

delay(10);
}
hello this is my full coding can you pls highlighted which is should be corrected?

Hi NabilFikri,

I don’t know what compiler/environment you are using. Is “Serial.setModule(7)” the correct syntax for your compiler? I am not sure that is necessary. Also, I believe you would probably need to refer to that particular serial port for all of your instructions. For instance, for UART7, I would expect your instruction “Serial.begin(9600)” should be changed to “Serial7.begin(9600)”.

Perhaps something like:

Serial7.begin(9600); //Initialize serial data (RS232 function)
Serial7.print(“Transmitting data to “); //Show info
pcip.printTo(Serial7);
Serial7.print(”:1234”);
Serial7.println();

In other words, replace “Serial.xxxx” with “Serial7.xxxx”.
Also, do you need to include a Serial.h file?

hi, im using energia ide currently Serial7 doesnt work as it turn to black and i dont need include Serial.h since it said doesnt have in the directory

Hi NabilFikri,

Is your comment about Serial7 not working because the Energia IDE currently does not support UART7 in their libraries, or is something wrong with the code?

If they do not support UART7, but do support some of the other UARTs such as UART2, I see that it is possible to connect to UART2 via PD4 and PD5 if you plug your BOOSTXL-RS232 pack into the BoosterPack 2 location. If you go with this, make sure that jumpers JP4 and JP5 are configured as shown here:

if i connected BOOSTXL-RS232 to boosterpack 2, should i change the jumper on BOOSTXL-RS232 also for GP5? since im using JP4(Boosterpack 2). My JP4 and JP5 is connected as the default since the jumper is already there from the beginning.

Hi NabilFikri,

After studying the pin-out options for the BOOSTXL-RS232 further, it looks like using UART2 is not as easily connected as I had previously thought, because Pin 6 of J1 is not routed to any of the pins on J5. This means you can not use one of the jumpers to connect U2Tx to Pin 6 on the BOOSTXL-RS232.

I can think of 3 options to consider:

  1. If Energia supports using UART6, then you can place the BOOSTXL-RS232 in the BoosterPack 2 location and keep the standard jumper settings. This will connect to GP3 and GP4 which connects to pins 118 and 119, respectively, of the TM4C1294.

  2. If Energia does not support UART6, but DOES support UART5, then you can place the BOOSTXL-RS232 in the BoosterPack 1 location and move the BOOSTXL-RS232 jumper positions to connect GP5 to TX2 and connect GP8 to RX2. This connects GP5 and GP8 to pins 23 and 22, respectively, of the TM4C1294.

  1. If Energia does not support either UART6 or UART5, but it DOES support UART2, then you could still possibly mount the BOOSTXL-RS232 in the BoosterPack 2 location. However, since Pin 6 of the J1 header on the BOOSTXL-RS232 is not internally connected to any of the pins of the J5 header, you would have to wire it externally with a length of wire with female sockets on each end to make a jumper from RX2 to Pin 6 of the J1 header. An example of such a jumper wire is the 1568-1644-ND. To do this, you can use the standard jumper to short TX2 to GP5, but you must remove the shorting jumper from RX2 and use a wire jumper such as the 1568-1644-ND to connect from any of the RX2 pins (J6) to Pin 6 of J1. This will connect TX2 and RX2 to pins 125 and 126, respectively, of the TM4C1294.

CTS and RTS can be connected to any GPIO right? if i connect RTS to GP11 and CTS to GP12 should be not a problem correct?


so this is my setup, and i still cant get it working and i really not sure whats happening, my CTS is connected to GP12,RTS is connected to GP13

For low baud rates like 9600 baud, you really shouldn’t need CTS and RTS. However, if you use them, I’m pretty certain you would need to declare which GPIO pins are being used somewhere in your code.

I see from the image you sent that you have the jumpers for ForceOn and ForceOff mounted. If so, ForceOff will be tied to GP18. On the BoosterPack 2 location, this is connected to the Tiva’s PP5 GPIO pin, which is Pin 106 of that device. If that pin happens to be configured as a logic LOW, that would disable the TRS3122 device, so make sure that pin is configured as a logic HIGH or as a high-impedance input. If you remove those jumpers, the pull-ups on the BoostXL-RS232 board will ensure that it is ON and auto-powerdown is disabled. For the purpose of trying to get this running, I would suggest removing those jumpers to ensure that it is always powered ON, for now.

does that mean i should remove jumper of FORCEON and FORCEOFF?

so i already remove CTS and RTS jumper, and as for header J9, only FORCEON is connected with jumper, the result is still the same

Hi NabilFikri,

As long as FORCEOFF jumper is removed, it should be OK, though removing both will guarantee it won’t go to sleep. I took a look at a color-coded graphic that Energia put out on their website here and it shows all of the pins which have UART connections available on the EK-TM4C1294XL BoosterPack headers.

I circled each of the UART labels and their associated pins on the BoosterPack headers. If you use the shorting jumpers and/or the wire jumpers with the BOOSTXL-RS232, you should be able to connect any of those UARTs to the EK-TM4C1294XL.

I note that it does not show access to UART2, which differs from what I read in the EK-TM4C1294XL User’s Guide. Based on this graphic, I guess trying to use UART2 might not work. However, the fact that UARTs 7, 6, 5, 4, and 3 are all shown on their website as available on the board implies, without stating explicitly, that one should be able to connect to any of these UARTs with their software. As I do not have the board nor the software, I cannot verify this, but it would be unusual for this not to be true.

If, for whatever reason, the higher number UARTs are not supported, then it might make sense to try UART3 or UART4 to see if they might work, using the proper jumper settings shown above.

Taking another look at your code and comparing it to other Arduino-like examples I have read, a couple of your lines don’t seem to show up elsewhere on the web. Specifically, the “Serial.setModule(x);” and “pcip.printTo(Serialx);” lines may be a problem, and I wonder if they could be causing an issue.