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
MathanRaja
Level 4
Level 4
100 sign-ins 10 questions asked 25 replies posted

Hi,

I am using EVAL IMM101T-046M and STM32F303RE. I have made user UART communication between STM32 and EVAL board. I can control the motor using the write register command. But the Read register is not working. 

Below is my Read Register code

int Target_Speed;

 uint8_t  Command[8] = {0x01, 0x05, 0x01, 0x79, 0x00, 0x00, 0xFE, 0x81};
 HAL_UART_Transmit(&huart1, Command, 8, 10);

HAL_UART_Receive(&huart1, Command, 8, 500);
Target_Speed=CONCAT(Command[4],Command[5]);

 

Thanks

Mathan Raja

0 Likes
1 Solution
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @MathanRaja,

We did some verification tests with an IMC101T board. Here is my finding. When ‘User UART Tx Delay Time’ is set to a non-zero value, I did see the reply frame’s command byte is 0x3F, which is different from the description in SRM. When ‘User UART Tx Delay Time’ is set to zero, the reply frame’s command byte is 0x85 as expected.

Please try to set 

HAL_UART_Receive(&huart1, Command, 8, 0);

and see if you receive 0x85 

So, for the moment, this seems to be a bug in the FW when the delay time is set to non-zero. Set the ‘User UART Tx Delay Time’ to zero to expect to see correct reply frame as described in SRM. This shall be taken care of in the future FW release.

 

Thanks,

Krupashankar

View solution in original post

0 Likes
4 Replies
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @MathanRaja,

Thanks for posting in the Infineon community.

Could you please share the UART data received from MCE to STM? and please make sure RX-TX and TX-RX of STM32 and IMM101T is connected properly.

We will try to recreate this issue and meanwhile could you please try to create a new buffer to receive the data rather than using the same Command array for transmitting and receiving?

 

Thanks,

Krupashankar

 

0 Likes
MathanRaja
Level 4
Level 4
100 sign-ins 10 questions asked 25 replies posted

Hi Krupashankar,                    

MathanRaja_0-1646908212097.png

MathanRaja_1-1646908212100.png

Here I am reading the target speed of the motor. The motor is running at 1000 RPM. I am also got 1000 RPM (0x3E8) in the Rx frame. But, the Rx frame command is 0x3F.But it should be replaced with instead 0x85 as per the software reference manual of iMotion.

I have tried with all other registers(Read, Write, etc) that time also I am getting 0x3F in the place of command in Rx frame (slave to master reply).

MathanRaja_2-1646908212103.png

Can you tell what is meant by 0x3F?

Can you let me know why we always getting responses as 0x3F for all commands?

Thanks

Mathan

0 Likes
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @MathanRaja,

We did some verification tests with an IMC101T board. Here is my finding. When ‘User UART Tx Delay Time’ is set to a non-zero value, I did see the reply frame’s command byte is 0x3F, which is different from the description in SRM. When ‘User UART Tx Delay Time’ is set to zero, the reply frame’s command byte is 0x85 as expected.

Please try to set 

HAL_UART_Receive(&huart1, Command, 8, 0);

and see if you receive 0x85 

So, for the moment, this seems to be a bug in the FW when the delay time is set to non-zero. Set the ‘User UART Tx Delay Time’ to zero to expect to see correct reply frame as described in SRM. This shall be taken care of in the future FW release.

 

Thanks,

Krupashankar

0 Likes
MathanRaja
Level 4
Level 4
100 sign-ins 10 questions asked 25 replies posted

Hi Krupashankar,

Thanks for your solution it is working.

First I have tried, 

HAL_UART_Receive(&huart1, Command, 8, 0);

But I received only one byte remaining 7 bytes were not updated.

So second, I have changed my configuration file . The User UART Tx delay time to zero. Now I am getting as per the SRM.

Thanks 

Mathan 

0 Likes