S32DS 3.5 S32K311 Quadrature Decoder issues

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

S32DS 3.5 S32K311 Quadrature Decoder issues

2,428件の閲覧回数
Luisandro
Contributor II

Hello! I am developing a project with the S32K311 device and I am having issues to get the quadrature decoder working. I did all configuration following the instructions in the chapter 4.2.5 of the document AN13767.

I instantiated, configured and initialized the modules TRGMUX, LCU and eMIOS, but when I try to read the encoder counts with the method Emios_Icu_Ip_GetEdgeNumbers() I get always zero. I already measured the signals on my board and the encoder pulses are present at the microcontroller pins PTB5 [14] ENC_PHB and PTB4 [15] ENC_PHA.

I attached my project in this post.

Can someone help me to understand what I am missing?

Thanks in advance!

0 件の賞賛
返信
5 返答(返信)

2,407件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Luisandro,

I will be testing your project, and I will come back to you on any findings.

As a note, I am going to test it with a S32K312.

Best regards,
Julián

0 件の賞賛
返信

2,381件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Luisandro,

I apologize for the late reply.

It seems the project you sent is missing some pins configurations, could you confirm you followed section 4.2.1. Port control and pin configuration from the AN?

Julin_AragnM_0-1707432262237.pngJulin_AragnM_0-1707432262237.png

Also, as a note, please keep in mind ENC_PHA & ENC_PHB are assigned to PTA19/20, not to PTB4/5 as you mentioned:

Julin_AragnM_2-1707432453826.pngJulin_AragnM_2-1707432453826.png

Best regards,
Julián

 

 

0 件の賞賛
返信

2,362件の閲覧回数
Luisandro
Contributor II

Hi @Julián_AragónM 

Yes, I followed the pin configuration instruction in section 4.2.1. I am not using the development kit, I am using a custom board, so for me the encoder signals ENC_PHA & ENC_PHB are actually connected to the pins PTB4/5.

I will attach the project again, see file third_project_s32k311_20240209.zip.

For me the pins configuration is showing correctly. See the screenshot below.

Luisandro_0-1707491577404.pngLuisandro_0-1707491577404.png

 

0 件の賞賛
返信

2,309件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Luisandro

In your shared project, or in the image you posted, I couldn't find the definitions as shown in the Application Note for the LCU0, and ADC, are you configuring them differently because of your custom board?

I will be waiting for your response.

Best regards,
Julián

 

0 件の賞賛
返信

2,300件の閲覧回数
Luisandro
Contributor II

Hi @Julián_AragónM 

Yes, I'm configuring it differently because my custom board does not have ADC or PWM, it only has the encoder. My board does not control the speed of the motor, it only monitors position and speed based on the encoder counts.

Let me know if you need any other info.

Best regards!

Luisandro

0 件の賞賛
返信