Packet Serial only working after connecting to IonStudio

General discussion of using Roboclaw motor controllers
Arcanemagei
Posts: 1
Joined: Fri May 25, 2018 8:49 am

Packet Serial only working after connecting to IonStudio

Postby Arcanemagei » Fri May 25, 2018 8:56 am

Hello! I’m trying to control a Roboclaw 2x45 from an STM32f4, using packet serial. I converted the arduino library to work with my microcontroller and set the driver up in IonStudio. Here’s the problem: if i power up the roboclaw and my board, and try to send anything, the board doesn’t do anything(i am unable to read data from roboclaw’s S2 because i didn’t include an rx pin on my board when i was designing it), and no led’s are blinking. But as soon as i connect the board to my computer via usb, with IonStudio open, the driver starts working normally, and it continues to do so even if i unplug the usb. It stops working, though, if i power cycle the driver. What could cause this issue and what can i do to resolve it?

User avatar
Basicmicro Support
Posts: 905
Joined: Thu Feb 26, 2015 9:45 pm

Re: Packet Serial only working after connecting to IonStudio

Postby Basicmicro Support » Fri May 25, 2018 10:45 am

1. We do not support TX only packet serial. RX is required for proper operation. You are free to try it of course but I can garuntee that in any real world application it will fail(sooner or later but probably sooner). I highly recommend you hack in a wire to the STM to handle RX.

2. Make sure you have the latest firmware installed on the Roboclaw

3. Make sure your baudrate is accurate on the STM. When USB is connected the Roboclaw clock is slightly more accurate so if your baudrate is on the edge of the error margin for asyncronous serial(around 2.5%) then plugging in USB could cause it to start working.

4. Use a scope to see what is going on. You can see if there is an ack even if your STM isnt able to read it. If you can take screen caps of the same command response before you attached USB and after I can tell you if the baudrate appears to be the issue. Use a command like the ReadVersion command so you get a large amount of RX data


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest

cron