infineon4engi@twitter infineon4engineers infineon@linkedin infineon@youtube
twitter Facebook Linkedin Youtube

Banner_DigitalMotorController Banner_IMM100_Series Banner_IMC100Series Banner_IRMCSeries Banner_iMotionApplicationKit


+ Reply to Thread
Results 1 to 2 of 2

Thread: User Mode UART and Register Write (0x06) command

  1. #1
    Beginner Beginner jure.novak is on a distinguished road
    Join Date
    Sep 2019
    Posts
    5
    Points
    70

    User Mode UART and Register Write (0x06) command

    Hi,
    I am using IMC101T-T038 device, that is connected via UART to a LPC800 microcontroller. I was able to establish USER MODE UART communication between the two devices and I am also able to control the motor using USER MODE UART functionality described in section 2.3 of Infineon-MCESW-RM-UM-v01_01-EN.pdf document.
    The trouble I run into is that when device is in operation I would like to change some registers content on the fly, but for some reason they are locked for edit. I am able to read the content of all APP ID = 1 registers, but am unable to change the content. Is there a lock mechanism of some sort, or is this just not possible? All other commands Read Status, Clear Fault, Register Read etc. work flawlessly, but Register Write command, while working correctly does not update the content of register that it is writing to.
    Is it possible to update the registers only using MCEDesigner and not USER MODE UART?

    Regards,
    Jure

    EDIT:
    Ok, after some experimenting it seems that when using command 0x06 to write a register to IMC device ,the value gets updated, but confirmation reply from IMC device returns the not updated value. For instance, by default my under voltage level in register dcUvLevel is set to 1767. When powering our custom board with voltage level lower then set under voltage limit, the read LED is blinking and indicating fault, also reading status register we can see fault 8 (under voltage). Now if I write 0 to register dcUvLevel (APP_ID 1, INDEX 14), setting under voltage protection to 0 V, the red LED stops blinking and fault register is cleared indicating no error, but return value from write command still includes old value of 1767!? Also when reading dcUvLevel register the return value is 1767?! Why is the value not updated?
    Last edited by jure.novak; Nov 13th, 2019 at 03:36 AM.

  2. #2
    Beginner Beginner jerry_yang is on a distinguished road
    Join Date
    Jun 2020
    Posts
    12
    Points
    160
    hi,
    Is your calibration algorithm consistent with the description in the reference manual in the user UART interface?
    Here are the frames I captured while debugging the communication interface.


    master→slave: 01 06 01 78 01 00 FD 81
    slave→master: 01 86 01 78 01 00 FD 01 //START

    master→slave: 01 06 01 78 00 00 FE 81
    slave→master: 01 86 01 78 00 00 FE 01 //STOP

    The last two check bytes calculated for the data frame should be:
    master→slave: (0x01+0x06+0x0178+0x0100)×(-1) = 0xFD81
    slave→master: (0x01+0x86+0x0178+0x0100)×(-1) = 0xFD01 //START

    master→slave: (0x01+0x06+0x0178+0x0000)×(-1) = 0xFE81
    slave→master: (0x01+0x86+0x0178+0x0000)×(-1) = 0xFE01 //STOP

    Then the description in the reference manual is:
    Click image for larger version

Name:	a.PNG
Views:	2
Size:	38.1 KB
ID:	4894

    What's the matter?
    ?????? ?????? a.PNG‎  

+ Reply to Thread
Disclaimer

All content and materials on this site are provided as is. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.