SCI communication Error (No source available)

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

SCI communication Error (No source available)

Jump to solution
5,668 Views
swapnil_chougul
Contributor I

Hello all,

@# SCI #SCI0 #SCI Error

I am trying to implement SCI code sent by you in S12ZVML-MINIBRD motor control application code.

As I implement SCI code in “S12ZVMLMINIBRD_BLDC_SW_CW11” motor control application code, the code error: No source available for "0x00C801 (0x00C801)() " occurs.

I am attaching the code kindly have a look.

 

I kindly request you, please suggest solution for above mentioned error.

I look forward for your response

Thanks in advance.

 

Sincerely,

Swapnil.

0 Kudos
Reply
1 Solution
5,117 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Swapnil,

Please refer to the MC9S12ZVML128_BLDC_Sensorless.c file of the MINIBOARD BLDC SW.

pastedImage_1.png

AN5190

pastedImage_2.png

AN4704 3-phase Sensorless BLDC Motor Control Kit with the S12 MagniV MC9S12ZVM

https://www.nxp.com/docs/en/application-note/AN4704.pdf 

pastedImage_4.png

Regards,

Daniel

View solution in original post

0 Kudos
Reply
24 Replies
4,649 Views
swapnil_chougul
Contributor I

Hello Diana,

I tried with the default configured "SCI1" module, but the "SCI1" module is not working. The issue with "SCI1" module is as I connect external device to "SCI1" port, transmitted data  from MC9S12ZVML128 doesn't arrives on the port pin.

(I did all jumper configurations as described in user manual, still "SCI1" port dont work)

I main purpose of my application is to receive the data from external device(ESP32), compare the received data and trigger an event to run the motor (Clockwise/ Counter Clockwise) direction. But as the data from external device(ESP32) arrives the "code error: No source available for "0x00C801 (0x00C801)() " occurs.

I kindly request you, please suggest the solution for above mentioned error.

I look forward for your response

Thanks in advance.

 

Sincerely,

Swapnil.

0 Kudos
Reply
4,649 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello Swapnil,

 

I would like to recommend you to create a completely new project and build your own application from the beginning rather than modifying an existing project.

 

Have you seen this error after the SCI interrupt is executed? You can start with a simple SCI example that uses an interrupt. Please, refer to the attached example. 

I hope it helps.

Best regards,

Diana

0 Kudos
Reply
4,648 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello Swapnil,

I have received information that you have still an issue with the SCI transmit on the S12ZVML-MINIBRD.

So, I have made for you a very simple test code without interrupt which just transmits data through SC1 on the S12ZVM-MINIBRD. Please, refer to the attachment.

I have verified that data are transmitted on the TXD1 pin (pin number 3) of the J7 port.  Is this what you need? If not, could you please elaborate your issue? 

TXD1.png

My board settings and tool:

- Debugger: USB multilink interface connected to BDM (J3)

- CodeWarrior 11.1

- 12 V power supply 

- J8 and J6 position 2-3

pastedImage_9.png

Important note: SCI1 should be routed to PS2, PS3 pins (because only these pins are connected to J6/J8)

MODRR0 = 0x08; //Route SCI1 to PS2, PS3 pins

Please, could you try it and let me know how it works? You can load the code as-is into the MCU.

Regarding your second question related to PT1 on J2. Just to be sure, which interrupt are you trying to generate, transmit interrupt of SC0?

I will appreciate when you contacting me directly if you have any issue next time.

Thank you.

Best regards,

Diana  

0 Kudos
Reply
4,648 Views
swapnil_chougul
Contributor I

Hello Diana,

Thank you for your response.

1) I am sure that you have checked transmission through SCI1 (USB to Serial Terminal) and it works fine, I too experienced it before.

But the major issue is when I connect external device (e.g. ESP32) on J7 SCI port (Pin 2: RXD, Pin3: TXD), I couldn't see any data. (I kindly request you, please connect the external device on J7 SCI port and observe it) . as you said that you have verified that data are transmitted on the TXD1 pin (pin number 4) of the J7 port, pin number 4 is not used for TXD1 (Its GND), please verify again.

2) Regarding my second question related to PT1 on J2, I want create an interrupt on PT1 and run the motor, I pulled PT1 on J2 High (by connecting it to VDDX), Unfortunately, it doesn't work. (I kindly request you please check and confirm, Is Port T pin (PT1) a dedicated hardware pin capable of receiving external interrupt request?).

I would like to inform you, in S12ZVML-MINIBRD User Manual (Document Number: S12ZVML-MINIBRD_UM 1.0 04/2014) in chapter 5, it is clearly written that the motor can be controlled using the J2 header, placing the jumper short bar to J2, pin 1-2.

3) Regarding my third question In order to control the PWM channels, I want to configure it in "Complementary low side fixed" mode. After referring the document number: AN5190 (S12ZVM Derivates: Configuring PMF module by Manuel Rodriguez), I configured the registers: PMFCGF12 (MaskVal) = X34, 0X1C, 0X13,0X31,0X0D, 0X07 PMFOUTC (OutCtl) = 0x0c, 0x30, 0x30 , 0x03, 0x03,0x0c PMFOUTB (BemfPhase) = {0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A};

With above values ​​the motor doesn't run.

I kindly request you please provide us the solution to resolve the above issues.

I look forward to hearing from you soon.

Thanks in advance.

Mit freundlichen Grüßen/ Best regards

Swapnil Chougule

Master Student

Landline +49 (0) 6102 748 60 99 04

Mail swapnil.chougule@clevercircuits.com<mailto:swapnil.chougule@clevercircuits.com>

Negotiation Planning Development & Support of Embedded Projects

Clever Circuits GmbH

Werner-Heisenberg-Str. 2a

63263 Neu-Isenburg

Visit our website www.clevercircuits.com<http://www.clevercircuits.com/>;

Follow us on LinkedIn<https://www.linkedin.com/company/1301370>

HRB 51635, Amtsgericht Offenbach

Geschäftsführer: Charbel Melhem

USt-IdNr. DE295639270

0 Kudos
Reply
4,648 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Swapnil,

A2.
The S12ZVM MCUs do not support pin interrupts on PT1.
Please see the S12ZVM RM rev2.13

pastedImage_1.png

The SW for the miniboard is not controlled by the PT1 pin but by FreeMaster (ctrlStates.usrControl.switchAppOnOff variable).
The document: S12ZVML-MINIBRD_UM 1.0 04/2014 is from 2014 and the SW has been changed since then.

Regards,

Daniel

0 Kudos
Reply
4,649 Views
swapnil_chougul
Contributor I

Hello Daniel,

I wold like to address you in the document available on NXP  portal (https://www.nxp.com/docs/en/quick-reference-guide/S12ZVMLMKQSG.pdf ) it is clearly written that motor can be run/stop with the junction J2, which is connected to Port PT1. 

pastedImage_6.png

pastedImage_7.png

could you tell me, the S12ZVM MCUs do not support pin interrupts on PT1 then why it is described in manual??

Also, I would like to inform you, shorting jumper 1-2 doesn't not work (Motor doesn't run).

Thanks.

Swapnil.

0 Kudos
Reply
4,649 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Swapnil,

The document does not say anything about interrupts.

BR, Daniel

0 Kudos
Reply
4,649 Views
swapnil_chougul
Contributor I

Hello Daniel,

Shorting jumper J2 (pin 1-2), is nothing but creating an interrupt on PT1.

pastedImage_6.png

Sorry, I didn't  got exactly what you mean "The document does not say anything about interrupts."

Could you tell me then what does shorting jumper J2 (pin 1-2) mean ??

Thanks!

Regards,

Swapnil.

0 Kudos
Reply
4,650 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Swapnil,

Out of reset, the PT1 pin is a digital input.

If the pin was open, it would be floating.

If J2 is in position 1-2, the pin is connected to VDDX, the state of the pin (log. HIGH) can be read by the SW.

Similarly when the pin is connected to the ground.

 pastedImage_1.png

pastedImage_2.png

But the current version of the SW does not do that.

Regards,

Daniel

0 Kudos
Reply
4,650 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello swapnil.chougule@clevercircuits.com,

Regarding Q3,
The application note AN5190 comes with the AN5190 SW example
You can find it here: https://community.nxp.com/docs/DOC-341377 

The example reads the hall sensor interface (Port T) during commutation.

pastedImage_2.png

pastedImage_3.png

But the S12ZVM MINI Board, that you are using, does not have any Hall sensor interface.

Please use the sensorless MINIBRD_SW

pastedImage_4.png

https://www.nxp.com/design/development-boards/automotive-motor-control-development-solutions/magniv-...

 

Regards,

Daniel

0 Kudos
Reply
4,650 Views
swapnil_chougul
Contributor I

Hello Diana,

Regarding my third question to control the PWM channels, I want to configure PMF module in "Complementary low side fixed" mode, by referring document below.   

pastedImage_1.pngpastedImage_2.png

I hope this application not is for all S12ZVM MCU, if I am wrong please let me know.

Is there is any additional application note for S12ZVM MINI Board (S12ZVML128 MCU)?? 

I would like to inform you, we are using same S12ZVML-MINIBRD_SW software.

pastedImage_3.png

pastedImage_4.png

I kindly request you please confirm.

Regards.

Swapnil.

0 Kudos
Reply
4,651 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Swapnil,

The AN is for all the S12ZVM derivatives, it shows use of the PMF module.

The S12ZVML-MINIBRD_SW software already utilizes this so called “Complementary low side fixed” mode as you can tell from this table (MC9S12ZVML128_BLDC_Sensorless.c):

/*****************************************************************************
*
* Constants Definition
*
*****************************************************************************/
const char MaskVal[6] = {0x34,0x1c, 0x13,0x31, 0x0d,0x07}; // {0x30,0x0c, 0x03,0x30, 0x0c,0x03};
const char OutCtl[6] = {0x0c,0x30, 0x30,0x03, 0x03,0x0c};
const char BemfPhase[6] = {0x03,0x02,0x01,0x03,0x02,0x01};

Regards,

Daniel

0 Kudos
Reply
4,651 Views
swapnil_chougul
Contributor I

Hello Daniel,

pastedImage_2.png

if you see in the AN S12ZVM derivatives, it shows use of the PMF module.

Register PMFOUTB hex values to control PWM channel is 0X2A as per the AN but in the Application code the values used are 0X03, 0X02 and 0X01 respectively, which doesn't  make any logical sens with the Application Note S12ZVM derivatives.

could you send us the AN where we can find the reference of this values(0X03, 0X02 and 0X01) used in the application code.

Thanks.

Regards,

Swapnil

0 Kudos
Reply
5,118 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Swapnil,

Please refer to the MC9S12ZVML128_BLDC_Sensorless.c file of the MINIBOARD BLDC SW.

pastedImage_1.png

AN5190

pastedImage_2.png

AN4704 3-phase Sensorless BLDC Motor Control Kit with the S12 MagniV MC9S12ZVM

https://www.nxp.com/docs/en/application-note/AN4704.pdf 

pastedImage_4.png

Regards,

Daniel

0 Kudos
Reply
4,651 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

Please first, let's solve the first query because it is related to this thread.

1. I'm very sorry it was a typo I mean J7 SCI port pin 3 (TDX1 as I said). I edited my answer. 

Actually I connected logical analyzer to J7 pin 3 TDX1 pin and I can see the data. (refer to the first image). Please, can you do the same?

So, please, could you tell me if you tried the simple test code which transmits 0x5F data? Have you seen the data on J7 SCI port pin number 3?

Thank you.

Best regards,

Diana

0 Kudos
Reply
4,651 Views
swapnil_chougul
Contributor I

Hello Diana,

As I told you before, the major issue is when I connect external device (e.g. ESP32) on J7 SCI port (Pin 2: RXD, Pin3: TXD), I couldn't see any data.

When I transmit any data, I can see it on J7 SCI port pin number 3 ,only if I connect logical analyzer or Oscilloscope, but as  connect external device external device (e.g. ESP32)  I couldn't see any data.

I kindly request you, please observe it by connecting any external hardware at the J7 SCI port.

I have also tried with different Hardware's, but there is no change with the result ( No data appears) .

I am also attaching the video, kindly have a look.

Thanks.

Best regards,

Swapnil.

0 Kudos
Reply
4,651 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello Swapnil,

I made some tests and I connected external device (Devkit S12ZVL128) to S12ZVML-MINIBRD through SCI.

And I'm able to receive and transmit data by S12ZVML-MINIBRD and also, by an external device.

 I assume that your issue could be in SCI settings of your external device or in SCI connection.

 I recommend you to check the baud rate, parity, stop bit, start bit settings, etc. 

Please, check the connection with the external device.

pastedImage_2.png

 I assume that the issue is not on our side.

Best regards,

Diana

0 Kudos
Reply
4,651 Views
swapnil_chougul
Contributor I

Hello Diana, 
I am really wondering about your tests.

I would like to inform you, with the following settings( Baud-rate:9600, Data Bit: 8, Stop Bit: 1, Parity Bit : None(0)) pastedImage_1.png

SCI connection, (USB to SCI) jumper J6 and J8 placed, pins 1-2 , S12ZVML-MINIBRD is able to transmit and receive the data. That implies the all the SCI settings are correct.

But, SCI connection,(J7 to SCI) jumper J6 and J8 placed, pins 2-3 , S12ZVML-MINIBRD is unable  to transmit and receive the data. 

The connection with external device is not too complicated.

pastedImage_5.png

I believe your assumption that issue is not on your side. 

 

Personally, I am not satisfied with your assumption. I have already sent an Video from our side for addressing these issue. 

I kindly request you, please suggest an effective way to address our issues and find the effective solution.

Regards,

Swapnil.

 

0 Kudos
Reply
4,651 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello Swapnil,

If you see the TX data on a scope when ESP32 is not connected, but you don't see them when ESP32 is connected, then, the issue is certainly in your HW.

Best regards,

Diana

0 Kudos
Reply
4,651 Views
swapnil_chougul
Contributor I

Hello Diana,

As you told, you made some tests and connected external device S12ZVML-MINIBRD through SCI.

 And you are able to receive and transmit data by S12ZVML-MINIBRD and also, by an external device.

 

I kindly request you please send us the code you used for test, the specifications of device ( useful for SCI) and settings of the deceive you connected.

Regards,

Swapnil.

0 Kudos
Reply