Hi, I am working on MC9S12ZVML128 Controller. Can you please provide sample code for LIN driver.

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

Hi, I am working on MC9S12ZVML128 Controller. Can you please provide sample code for LIN driver.

1,160 Views
snehitinaik_16
Contributor II

Regarding Lin driver

Labels (1)
0 Kudos
5 Replies

913 Views
peter_shi
Contributor II

Hi Diana,

The compliler couldn't pass for AN5201. 

C:/Freescale/CW MCU v10.6/MCU/S12lisa_Tools/Build_Tools/mwccs12lisa|Compiler|Error
(C:\Users\Peter\Desktop\MagniV\SW\LIN\Software\MC9S12ZVML128_LIN_BLDC_Sensorless\MC9S12ZVML128_BLDC_Sensorless.c|825|2|13|26889|13)
= currentPIPrms.f16InErrK1 = 0;

0 Kudos

913 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi Peter,

Have you seen any other errors or warnings?

At first, try to clean project.

I tried it and I'm able to build AN5201 sw.

I'm using the newest version CodeWarrior 11.1.

I imported the project by File -> Import -> General -> Existing Project into Workspace

 

Could you, please, check the path to that file? Can you find the file in your file system? 

C:/Freescale/CW MCU v10.6/MCU/S12lisa_Tools/Build_Tools/mwccs12lisa 

Best regards,

Diana

0 Kudos

913 Views
peter_shi
Contributor II

Hi Diana, Thanks for your support. I can build now.

Does this demo code work well based on S12ZVML-MINIBRD?  I tried a Baby-LIN-II to communicate with it. It failed.

https://www.nxp.com/docs/en/application-note-software/AN52LIN.PNG01SW.zip 

0 Kudos

913 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi Peter,

I have not tested this SW with S12ZVML-MINIBRD, but the AN5201 SW is provided with the different boart S12ZVM128EVB. So, there can be differences in port usage.

In that case, I would like to recommend you start with the LINstack driver examples.

https://www.nxp.com/webapp/Download?colCode=FSL_LIN_2.X_DRIVER 

Using NXP’s LIN Driver with the MagniV Family

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

For more details about S12ZVML-MINIBRD see:

S12ZVML-MINIBRD and S12ZVML-MINIKIT 3-phase Motor Control reference designs | NXP 

I hope it helps.

Best regards,

Diana

0 Kudos

913 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi Snehati,

Please refer to official LIN 2.X DRIVER on the link below. The available sample codes for the LIN driver can be found in the C:\NXP\FSL_LIN_2.x_STACK_Package_4.5.9\Examples directory. There is the example for the S12ZVML128 master and slave. 

https://www.nxp.com/webapp/Download?colCode=FSL_LIN_2.X_DRIVER 

Also, application note AN5201 can be useful:

Integrating the LIN driver with BLDC sensorless motor controller:

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

SW:

https://www.nxp.com/docs/en/application-note-software/AN5201SW.zip 

I hope it helps you.

Best Regards,

Diana

0 Kudos