how to use sci/uart to debug by freeamster

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to use sci/uart to debug by freeamster

1,011 Views
NoahXu
Contributor III

i use this public sw, but seems the sci port of ECU not respond .

i set the SCI as communication port ,also the freemaster SCI is stack is in place.

can you support to check why my app cannot work?

NoahXu_0-1705411221178.png

NoahXu_1-1705411239861.png

 

 

0 Kudos
7 Replies

977 Views
RadekS
NXP Employee
NXP Employee

Hello NoahXu,

I am bit confused. Your screenshots are from FreeMASTER project created for PMSM FOC project, while you attached very very very old project for BLDC 6-Step comutation. 

Could you please double check that you run the FreeMASTER project that came with project uploaded into MCU?

Please let us know which sw project do you use.

If you use standard S12ZVML EVB/KIT (e.g. S12ZVMEVB, MTRCKTSPNZVM128), there are two USBs on the board. Please ensure that you connected the right USB port (accroding to J27 and J28 jumpers), you properly installed the CP2102 (J27,J28 in possition 2-3) or OSBDM (J27,J28 in possition 1-2) drivers, you connected board to 12V and you uploaded the code into MCU, let the code run and disconnect (button in CW debugger) for avoiding interference with serial communication. 

 

Best regards

RadekS 

0 Kudos

958 Views
NoahXu
Contributor III

Hi, Radek

it is my fault, i upload the wrong code.

now the right code is uploaded. it is the S12ZVM_RDB_EWP.

the connection is like the screeshot.

but still got the negative feedback from freemaster.

is there any special setup should i do to start the sci connection?

NoahXu_0-1705563046285.png

 

0 Kudos

880 Views
RadekS
NXP Employee
NXP Employee

Hello NoahXu,

Thank you for more details. Tips for you:

  • The standard BDM connector contains only BKGD, RESET and power supply pins. The RX and TX pins are there additionally, and I suppose, that the majority of BDM interfaces (like PEmicro Miltilink) will ignore these pins. You need both, BDM and any USB to TTL (at 5V) interfaces. The virtual COM port created by BDM interface typically works only in the case of on-board OSBDM, but not in the case of external interfaces like USB Multilink.
  • When I open the attached SW, I can see that you tried to use the JTAG connection in FreeMASTER. This should be possible when you disconnect the BDM connection from CW debugger. However, the FreeMASTER features will be limited (e.g TSA tables or Recorder are not available). I believe that you tried that because you have a problem with the serial connection (original post).
  • I checked in the SW that FreeMASTER set to use SCI1 at speed approx. 19200kbps (based on 50MHz bus clock and divider 2604). That should be correct.
  • Remaining ideas:
  1. Are you sure that you connected USB to serial interface correctly? The TX pin from interface should be connected with RX pin on board and opposite RX pin from interface should be connected with TX pin on board. I typically connect also the GND signal, but no power line (if available).
  2. Are you sure that you installed correctly the drivers for USB to TTL interface? Please use the Win+X buttons to open Device Manager and check what virtual COM port belongs to USB to TTL interface.

BR

RadekS

0 Kudos

877 Views
NoahXu
Contributor III

Hi, Radek

due to the limited room of  the layput, i use the 6 pin connector as previous attatched for 2 purpose:

i made 2 cable harness, after i flasehed the ECU, i will disconnect the BDM cables and connect uart cables for debug. 

the uart cable have 3 pins , rx tx and gnd, which is conenct to tx rx and gnd of ECU.

i use this cable for other app, and it works. but for the s12z app it just not work.

so i cannot use this recorder function for some precise debug like the 3 phase current signal, svm sectors...

 

do you have some demos which is ok to use the uart debug functions? i would like to check.

 

 

0 Kudos

865 Views
RadekS
NXP Employee
NXP Employee

Hi NoahXu,

attached is quite a primitive SCI example code for your reference.

Just init and transmit strings in pooling mode.

I hope it helps you.

BR

RadekS

0 Kudos

982 Views
iulian_stan
NXP Employee
NXP Employee

Hi @NoahXu,

Is 9600 bps option selected on the UART screen ?

I can see on your print screen 19200, but according to BLDC MC9S12ZVML128 Motor Control Development Kit User Guide - default baudrate is 9600.

0 Kudos

957 Views
NoahXu
Contributor III

Hi ,  Iulian  

the code is wrong , not the right code is upload.

0 Kudos