Announcements

From sunburn to sun earn – we’ve got the power! Watch our #poweringgreen videos now.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
davisonInfineon
Level 2
Level 2
First like received First solution authored 10 sign-ins

I'm having an issue with sending UART commands to the EVAL-M1-101TF.

I am using an XMC1100 with custom code to send UART commands to the IMC101T.  I have confirmed that the UART commands that I am sending are correct using an oscilloscope and decoding function, and the fact that MOST of the responses are happening properly. 

I am attempting to send 12 "read register" commands, one after another, every 100ms. The way my XMC1100 is sending UART commands is that it is sending the message frame, waiting for a response, then sending the next frame if the response comes in properly. If the response doesn't come (from the IMC101T to the XMC1100), the XMC1100 will re-try sending the same TX UART message to the IMC101T, up to 5 times.

What I am seeing is that some of the time, the IMC101T does not respond to the command sent to it. Can someone help me with this? Is there some sort of busy state on the IMC101T that it doesn't allow UART commands to come in?

 

Seen in the picture below are UART TX and RX messages, to and from the IMC101T.

The green waveform is the TX "read register" command coming from the XMC1100. The blue waveform is the "read register" RESPONSE from the IMC101T. The XMC1100 device sends the next "read register" command as soon as it receives a response from the previous command.

 

The problem I'm having is shown in the middle of the screen, near the bottom. The "read register" command is sent (green before the first big gap), it waits for a response, gets none, and times out. After timing out, it retries sending a "read register" command, until it either receives a response or it tries this 5 different times. In this case, the IMC101T did NOT respond to a message that was sent to it TWICE in a row. What is causing this problem????

Photo Sep 01, 3 49 57 PM.jpg

0 Likes
1 Solution

Hello,

Each UART command is processed every 1ms. Data frame transmission also take some time , which is based on baud rate. If  115200bps is used, the transmission less than 1ms (there are two transmission). Plus IM101 processing time. IMC command processing time and transmission time may overlap.The total time cost 2- 3ms. Therefore, 3ms is enough @115200bps baud.

But user UART command used the free time of MCE.Highest priority is given to motor control algorithm. Because of this, if the CPU load is high MCE will not proces user UART command.

You should check your CPU load.  Increase the fast control rate to 2 or reduce the PWM frequency this should help to reduce CPU load.

View solution in original post

0 Likes
5 Replies
LinGuohui
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 solutions authored

Hi @davisonInfineon ,

For User Mode UART, Each UART command is processed every 1ms. Observe your UART waveform, each command is transmitted for nearly 1ms.

I suggest you increase the delay time. You can add this delay through MCEWizard Q21- User UART Tx Delay Time. For example, 1 ms. You can also add this dealy time between receiving  and next sending in your MCU.

Hope this is useful.

0 Likes

Thanks for the quick response.

I have tried this but the problem still persists. Is there some maximum speed of sending the IMC101 messages?

0 Likes
LinGuohui
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 solutions authored

User Mode UART , Baud rate can be configed as: 2400 bps, 9600 bps, 19200 bps,67500 bps, 115200 bps, and 230400 bps by MCEWizard.The maximum speed is 230400bps.

IMC101 doesn't respond TX messages, Which may be IMC101 receive wrong signal. Like error of band rate, or  too slow signal ramp. You should analyze the TX signal waveform without response. For hardware, you can pull-up the Rx and Tx lines to Vcc with a 4.7k or 10k  resistor.Observe whether there is effect.

Finally, reducing the baud rate is a useful method.

0 Likes

Hello LinGuohui,

I have tried these options. They did not solve the problem. And what I meant by maximum speed is NOT baud rate / bit rate. I mean the maximum rate at which the IMC101 can receive a message and send a message back. For example, if I send a command (8-byte message frame) from the MASTER (xmc1100) to the slave (imc101) ONCE every ~3 milliseconds, will the imc101 be able to respond back to EVERY single message it gets? 

0 Likes

Hello,

Each UART command is processed every 1ms. Data frame transmission also take some time , which is based on baud rate. If  115200bps is used, the transmission less than 1ms (there are two transmission). Plus IM101 processing time. IMC command processing time and transmission time may overlap.The total time cost 2- 3ms. Therefore, 3ms is enough @115200bps baud.

But user UART command used the free time of MCE.Highest priority is given to motor control algorithm. Because of this, if the CPU load is high MCE will not proces user UART command.

You should check your CPU load.  Increase the fast control rate to 2 or reduce the PWM frequency this should help to reduce CPU load.

0 Likes