Usb to rs485 serial communication

I try to use the usb of NX to control the servo of Robotis with a usb to rs485.
However, the NX seems to have greate loss when our conmunication speed up to 100Hz.
Servos vibrate noticeably. Strangely, it was working fine until I flashed a new system into exactly same NX.I don’t know if it’s there is an solution to speed up the conmunication.

I can’t give you a “good” fix, but the first thing you need to do is place the Jetson in its max performance mode. Any kind of energy savings mode would get in the way quite fast. Example:
sudo nvpmodel -m0

That gets the most computing power with an increase in power consumption and heat production, for for a lot of cases this won’t matter.

The other half of the problem is that the hardware itself is not “hard realtime capable”. The ARM Cortex-A CPU is meant for high average performance, but the cache can be hit or miss, and this means you cannot guarantee a given process a certain time slice (deterministic) at a higher priority than others. You can though increase priority of a given process (called “nice” level since a high priority is less nice, and runs at a negative nice level), and as long as the competing process is not important (there are many unexpected issues at times), then the renice to say a -5 level could bump up your communications quality.

Now imagine that you’ve bumped up the RS-485, but it has a buffer to fill, and you’l placed the communications at a higher priority than the process which empties the buffer…you will instead stall out the process.

A hard realtime CPU would be the ARM Cortext-R series. The Cortex-M is similar, but the R is far superior. The R includes hardware assist of scheduling (which is exponentially difficult with more processes), and the M does not. You could in fact make an inexpensive Cortex-M board as an intermediate buffer for when the Jetson’s A series has “burps” in service.

You won’t see much on the topic, but Jetsons tend to have an Signal Processing Engine (SPE), and an Audio Processing Engine (APE). Behind each engine you will find something like a Cortex-A dedicated CPU core, but unless you read closely, you won’t see that each of these also has a Cortex-R5 dedicated to the engine. This is how certain higher data performance hardware succeeds with exactly your issue.

The Cortex-M is cheap and widely available, but you might consider using one of these to drive the 485, and let the Jetson program the Cortex-M.

See what you can do with the max performance mode. After that, find out what programs or processes talk to the 485 or read from it. If you are careful, then you perhaps bump up performance without making something else fail.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.