motor not working when SCI is disconnected from PC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

motor not working when SCI is disconnected from PC

ソリューションへジャンプ
8,872件の閲覧回数
ankur_kala
NXP Employee
NXP Employee

One of the customer reports that while working, the setup works well if SCI terminals are connected to sci/usb cable with PC. however the system stops working as soon as the connection is broken. SCI is working in interrupt mode. Also communication need not be going on while connected to PC.

ラベル(1)
0 件の賞賛
返信
1 解決策
8,573件の閲覧回数
ankur_kala
NXP Employee
NXP Employee

Hi RadekS,

Thanks for your support all through. the customer finally shared his SCI code and motor control code with us and we found out that the SCI generated from PE was making a blocking transmit call (waiting for transmit to complete in the transmit function). On making it non blocking the system worked fine.

Regards,

Ankur

元の投稿で解決策を見る

0 件の賞賛
返信
10 返答(返信)
8,573件の閲覧回数
iggi
NXP Employee
NXP Employee

I suppose the ctm uses S12ZVM evaluation board and MC9S12ZVML128_BLDC_Sensorless SW. Correct me if i am wrong.

One of the two USB ports on the eval board is used for SCI communication with PC. Usually Freemaster software tool is installed on PC and used to manipulate the motor on the board. Still the development board and the motor should work even the communication with the PC via USB cable is disconnected.

Now, the question is if the customer modified the initial motor control SW. This could lead to such issue.

Regards,

iggi

0 件の賞賛
返信
8,573件の閲覧回数
ankur_kala
NXP Employee
NXP Employee

No, the customer is working on his own hardware and software. Point to note is that just a USB connection to PC is enough for the system to work. It does not need to be communicating with the PC. Seems more of a hardware issue. The customer has already tried shorting SCI connection ground pin to Battery ground, but that also did not help.

0 件の賞賛
返信
8,573件の閲覧回数
RadekS
NXP Employee
NXP Employee

Hi Ankur,

It is hard to say, what could be reason for that behavior.

Could you please specify type of MCU?

Could you please share or send schematic for short check?

Could you please share or send software for short check?

Is necessary some communication over serial channel or just physical connection is enough?

Did costumer apply any power save mode in software (like STOP mode)? SCI communication could be used as wake-up event.


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
8,568件の閲覧回数
ankur_kala
NXP Employee
NXP Employee

Hi RadekS,

S12ZVM is the MCU. The customer is not ready to share the complete application schematic or software. The snapshot for SCI connector is attached which customer shared. Software is based on the S12ZVM bldc software available for EVB. the SCI component has been initialized from Processor Expert tool and uses the 'interrupt' approach which means the buffer should fill up and no TX event would fire.

For mode when communication is not working but just the physical connection is established between the board and the PC, the system works fine.

theres one more observation from the customer - "Since the beginning of the project, UART / USB -> PC communication only works if I turn on the board AFTER connecting to PC. If I turn on the board and then connect the USB to PC the communication never starts so I have to power cycle the board. "

Regards,

Ankur

0 件の賞賛
返信
8,568件の閲覧回数
RadekS
NXP Employee
NXP Employee

Hi Ankur,

Thank you for additional information.

In this case I suspect wrong connection of TEST pin. Please check connection of TEST pin.

The TEST pin must be tied to ground in all applications.

If you restart MCU and voltage at TEST pin isn’t low, MCU will enter into test mode. I am not sure now, but if I remember correctly, PT0 and PT1 pins are used for initial configuration of TEST mode.

This could be reason why code runs only when serial cable is connected and this connection must be established prior MCU reset.

TEST mode is reserved only for factory tests therefore configuration of TEST mode isn’t officially public information.

Note: You could create service request on Freescale pages. This way we could offer checking of non-public schematic/project.


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

8,568件の閲覧回数
ankur_kala
NXP Employee
NXP Employee

Hi RadekS,

the customer has already pulled down the test pin in his schematic. he has shared the MCU section schematic. Attaching the same here.

Regards,

Ankur

0 件の賞賛
返信
8,568件の閲覧回数
ankur_kala
NXP Employee
NXP Employee

Hi Radek,

One more point I would like to point out is that the pins mentioned above PT0 & PT1 are the pins being used for SCI communication. Will pulling up or low on hardware sort something out (just a thought).

Regards,

Ankur

0 件の賞賛
返信
8,568件の閲覧回数
RadekS
NXP Employee
NXP Employee

Hi Ankur,

If TEST pin is connected to GND we could exclude TEST mode from potential root causes.

So, there remains a potential issue with power supply and software which somehow depends on PT0/PT1 voltage levels.

In typical motor control applications, TIM OC0 is used internally to indicate commutation events. However if you route SCI0 signals directly to PT0/PT1 (S0L0RR[2:0]=110) and you enable SCI0 module, this should take precedence prior other settings and pins should be reserved for SCI.

On opposite side you can still route PT0 signal to TIM0 ch3 (T0IC3RR1-0). So, timer module could be influenced by PT0 voltage level.

So, voltage levels could have some hidden effect even when pins are configured for SCI. Additionally SCI is typically not initialized directly after reset. So, it depends also on code prior we enable SCI module.

Pull-ups/downs influence could be tested by setting PERT, PPST registers in some early initialization function.

Important note:

You mentioned that customer combined S12ZVM bldc software available for EVB with code generated by Processor Expert. I would like to note about dangerous in case of this approach for some registers. PE code generates low level initialization code and EVB software has own low level configuration. Unfortunately some of registers could be written just once – for example MODRR0, MODRR1, MODRR2.

The same is valid for some other registers/bits. Please check at least whether customer software do not initialize these registers more than once – especially MODRR and CPMU registers.

About voltage power supply)

Reference manual recommends 1kOhm resistor between emitter and base of the BJT (R2, R3).

Could you please check VDDX voltage level by oscilloscope in both cases (with and without SCI connection)?

Your scheme of sci connection contains line VDDC, unfortunately I didn’t found that line in schematic.

Could you please check voltage level at this line and whether it is used as voltage input from USB2UART cable (typically we use just GND, RX and TX lines)?


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

8,574件の閲覧回数
ankur_kala
NXP Employee
NXP Employee

Hi RadekS,

Thanks for your support all through. the customer finally shared his SCI code and motor control code with us and we found out that the SCI generated from PE was making a blocking transmit call (waiting for transmit to complete in the transmit function). On making it non blocking the system worked fine.

Regards,

Ankur

0 件の賞賛
返信
8,568件の閲覧回数
RadekS
NXP Employee
NXP Employee

Hi Ankur,

thank you for let us know the root cause.

So, it was pure software issue.

I am glad that problem was resolved.

0 件の賞賛
返信