This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM263P4: Resolver

Part Number: AM263P4
Other Parts Discussed in Thread: UNIFLASH, SYSCONFIG

Tool/software:

Hey Experts,
ive some question regarding the resolver module.

As SW i am using:
CCS 12.8.1.00005
SDK 10_00_00_35
Uniflash 8.8.1.4983

As HW ive a custom board.

Here is my config for the resolver:

Here are my HW connections:



A resolver is only connected to RESOLVER1.

1) As Excitation PWM Out ive selected 2 pins. regarding this post:https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1345059/am263p4-does-the-resolver-support-output-differential-pwm
its the same output just at 2 pins. My problem is, that i can see the excitation PWM at PWM0, but at PWM1 there is just 0V (checked HW, there is no short zo GND at this line). Any ideas, why i don't see the excitation PWM there?

2) Nevertheless if i check the resolver 2 registers i see the following values:

which change if i turn the resolver which is only connected to resolver 1. 
If i measure the voltage at pcb with oscilloscope  at RESOLVER2 SIN or RESOLVER2 COS its flat 1.65V (reference voltage for input amplifier).
So i would expect stable values for the angle and velocity. 
Do you have any idea why the values change?
Can i check the measured raw ADC values in any register? I only found the calculated arctan and track2 values i posted above.

Best regards,

Marcel

  • Hey,
    meanwhile i looked deeper into my problem and found out some things regarding point 2:
    I found some registers with ADC values:

    is there anywhere more information to this registers as i find in their description?
    ADC is 12bit, these registers are 16bit. How can I claculate back my raw valtage at the input pin?

    Moreover i tried to check if my pinning is correct.

    I coudn't find any information about single ended pinning in TRM. But i found that in an SDK example:

    Can you confirm, that this is the correct pinning if i want to use RCD Sequencer mode 3?
    If so, is there any way how i could fix this Hardware issue in Software?

    Best regards,

    Marcel

  • Hi Marcel,

    Please see my replies below,

    Here are my HW connections:

    Assuming you are using single ended signals, these connections do not match any of the configurations given in Section 7.5.3.2.2.1.1 Sequencer and RDC Modes of Operation of AM263Px Sitara Microcontrollers Technical Reference Manual (Rev. C). You would have to modify these connections. Please refer to the Figure 7-165 to Figure 7-170 for all the 6 configurations possible.

    So, with the current hardware configuration/connections, you will be able to use Mode 0(as per Section 7.5.3.2.2.1.1.1 Mode 0 of TRM), where in only the External Resolver 1 is correctly connected to ADC_RO_AIN0 and ADC_R1_AIN0 pins.

    but at PWM1 there is just 0V (checked HW, there is no short zo GND at this line)

    On the RES0_PWMOUT1(on D18 pin), can you please check if the Mux mode is set correctly in the register PR0_PRU1_GPIO8_CFG_REG(at 0x531001A8)? The Mux mode should be set to Mode 8 to select RES0_PWMOUT1 mux mode.

    which change if i turn the resolver which is only connected to resolver 1

    This might be due to the wrong connections as mentioned earlier.

    If i measure the voltage at pcb with oscilloscope  at RESOLVER2 SIN or RESOLVER2 COS its flat 1.65V (reference voltage for input amplifier)

    This might be because there is no excitation signal. If there is no excitation signal, usually the external Amplifier would settle at the reference voltage.

    Do you have any idea why the values change?

    Since you have mentioned in second answer that you are using Sequencer mode 3, the above connections might be causing both the RDC values to change. So please correct the connections as mentioned earlier.

    Can i check the measured raw ADC values in any register? I only found the calculated arctan and track2 values i posted above.

    These can be read using the ADC Result registers of ADC_R. Pleas refers to ADC_R_RESULTS Registers at 0x502C6000 for ADC_R and 0x502C8000 for ADC_R1.

    is there anywhere more information to this registers as i find in their description?

    Please refer to Section 3.12.1 RESOLVER Summaries of AM263Px Sitara Microcontrollers Register Addendum (Rev. A) starting from address 0x502CB0EC and 0x502CB2BC.

    Can you confirm, that this is the correct pinning if i want to use RCD Sequencer mode 3?

    Yes, the pinning mentioned in the table is correct and matches that of Figure 7-168. Mode -3 of AM263Px Sitara Microcontrollers Technical Reference Manual (Rev. C). The Figure 7-168 shows the differential connections, single ended connections can be referred from the same(positive signals only)

    If so, is there any way how i could fix this Hardware issue in Software?

    I don't think it is possible to fix this issue in software for using the Resolver to Digital Converter Functionality.

    Thanks,

    Tejas Kulakarni

  • Hey Tejas,
    thanks for your reply. Got a few questions to that:

    On the RES0_PWMOUT1(on D18 pin), can you please check if the Mux mode is set correctly in the register PR0_PRU1_GPIO8_CFG_REG(at 0x531001A8)? The Mux mode should be set to Mode 8 to select RES0_PWMOUT1 mux mode.

    looks like it is mode 8 but there is no output. Tried to switch it to PR0_PRU1_GPIO14 ... same result there. Also just used PR0_PRU1_GPIO8 as GPIO to check for any HW fault, but i could toggle it like expected. 

    These can be read using the ADC Result registers of ADC_R. Pleas refers to ADC_R_RESULTS Registers at 0x502C6000 for ADC_R and 0x502C8000 for ADC_R1.

    These registers are just showing zeros:

    while the resolver registers show values:



    Best regards

    Marcel

  • Hi Marcel,

    Can you please just try configuring the Resolver ADCs and just try reading the values, just to ensure the signal is actually reaching the ADCs?

    Also, if possible, can you probe on the board and actually check if there is some signal reaching these Resolver ADCs?

    Were you able to change the hardware configuration as suggested in previous answer? Please let me know, else Resolver will not be able to resolve any angles.

    Thanks,

    Tejas Kulakarni

  • Hey Tejas,

    Can you please just try configuring the Resolver ADCs and just try reading the values, just to ensure the signal is actually reaching the ADCs?

    Also, if possible, can you probe on the board and actually check if there is some signal reaching these Resolver ADCs?

    Resolver 1 is connected propperly the results comming out of the resolver interface (angle and velocity) looks pretty good. So signals are reaching the Resolver interface.

    Were you able to change the hardware configuration as suggested in previous answer? Please let me know, else Resolver will not be able to resolve any angles.

    Sadly this isn't possible in my current HW revision.


    On the RES0_PWMOUT1(on D18 pin), can you please check if the Mux mode is set correctly in the register PR0_PRU1_GPIO8_CFG_REG(at 0x531001A8)? The Mux mode should be set to Mode 8 to select RES0_PWMOUT1 mux mode.

    looks like it is mode 8 but there is no output. Tried to switch it to PR0_PRU1_GPIO14 ... same result there. Also just used PR0_PRU1_GPIO8 as GPIO to check for any HW fault, but i could toggle it like expected. 

    Any ideas why i have no output at RES0_PWMOUT1? Also tested it at different PCBs i have to ensure my µC isn't damaged. But same result at every PCB.

    Best regards,

    Marcel

  • Hi Marcel,

    Apologies for the delayed reply. I was just checking the register values you had shared. I see that the PR0_PRU1_GPIO8 register is configured to value 0x000005F7, but for using it in default condition with only Mux mode set to RES0_PWMOUT1, we would have to set it to 0x000005F8. Can you try this once and see if RES0_PWMOUT1 is seen?

    Thanks,

    Tejas Kulakarni

  • Hey Tejas,
    sorry but i dont get your instructions.

    I see that the PR0_PRU1_GPIO8 register is configured to value 0x000005F7

    its actually configured to value 0x00000508
    its the same value then RES0_PWMOUT0 which is running fine. 

    Best regards,

    Marcel

  • Hi Marcel,

    Apologies, I meant you would have to set the register to the mux mode to 8 and hence set the PR0_PRU1_GPO8_CFG_REG register to 0x000005F8 to have it in Mux mode 8 which is RES0_PWMOUT1. Can you please cross verify that? Writing 0x000005F7 would put it in Mux mode 7.

    Thanks,

    Tejas Kulakarni

  • Hey Tejas,

    I see that the PR0_PRU1_GPIO8 register is configured to value 0x000005F7

    where do you see this?
    The only screenshot i shared has register value 0x00000508. 
    So it's already in mux mode 8.

    Best regards,

    Marcel

  • Hi Marcel,

    Yes, the screenshot you shared has value 0x00000508, but I meant to cross check it again when your code is running(check from the memory browser with auto-refresh on). Just wanted to ensure, no other piece of code is setting it back to any other Mux mode. Also if that is verified, can you try writing 0x000005F8 once and see if that fixes the issue?

    Also is there any possibility of isolating the pin PR0_PRU1_GPIO8(D18) completely and the probe it once? May be if you have a series resistor, unmount it so that the pin is isolated from the rest of the circuit and then try probing it on the MCU side?

    Thanks,

    Tejas Kulakarni

  • Hey Tejas,

    the pin is completly isolated. The value of the pin is unchanged when my code is running. I tried writing it to 0x5F8 but that didn't change anything.

    Best regards,

    Marcel

  • Hi Marcel,

    I am not sure as to what else can cause this problem. Can you do a code comparison of the configuration of  RES0_PWMOUT0 and RES0_PWMOUT1?

    Meanwhile I will ask my colleague to check on this once, to see if we are missing anything from SDK or SysConfig side.

    Thanks,

    Tejas Kulakarni