How to set PDB to trigger PDB interrupt for S32K14X BLDC example,

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

How to set PDB to trigger PDB interrupt for S32K14X BLDC example,

2,113 Views
dannydeng
Contributor III

Dears,

  Customer download the S32K144 BLDC example to debug their software, and hope to trigger PDB intrrupt to monitor some status, but when set the interrupt enable in Prossor Export, it still cannot go in to PDB interrupt. Can you help to advice?

Thanks & BRs,

Ray Deng

0 Kudos
Reply
10 Replies

1,941 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

The check box from PDB Processor Expert component just enable the interrupt request on PDB side. It doesn't handle NVIC configuration.

Please call INT_SYS_EnableIRQ to activate your PDB request and INT_SYS_InstallHandler to install ISR.

Best regards,

Razvan

0 Kudos
Reply

1,941 Views
dannydeng
Contributor III

Hi Razvan,

Thanks for your kindly hep, actually, we added the INT_SYS_EnableIRQ  and enabled global interrupt, is there any other place need check?

BRs,

Ray Deng

0 Kudos
Reply

1,941 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

In this case everything should be fine.

Are you sure that PDBIF(from SC register) bit field is set to generate the interrupt?

Razvan

0 Kudos
Reply

1,941 Views
dannydeng
Contributor III

Hi Razvan,

   Actually, we can use PWM-PDB-ADC genereate ADC sampling, and we cannot capture PDBIF bit, INT_SYS_EnableIRQ  already added, Global Interrupt enabled, I DO really not know which would leads to such situation.

BRs,

Ray

0 Kudos
Reply

1,941 Views
razva_tilimpea
NXP Employee
NXP Employee

Please share your project to check it.

0 Kudos
Reply

1,941 Views
dannydeng
Contributor III

Thnanks, Razvan,

Already updated in the first question,

0 Kudos
Reply

1,941 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

This application doesn't change IDLY value, and by default it is 0xFFFF.

In this case CNT value can't be higher than IDLY, so conditions for interrupt request are not matched.

You can update this value by calling  PDB_DRV_SetValueForTimerInterrupt and PDB_DRV_LoadValuesCmd.

I don't know exactly which event from you application is expected to trigger this interrupt, but I don't think this PDB event will help you.

Best regards,

Razvan

0 Kudos
Reply

1,941 Views
dannydeng
Contributor III

Hi Razvan,

   Modified with your advice, it can go into PDB interrupt, but it just go into interrupt every 1us, when PDBIDLY changed. Is there any other place need modify?

   Customer use it to check the PWM time position when it generate ADC conversion.

BRs,

Ray

0 Kudos
Reply

1,941 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

PDB doesn't provide this type of interrupt. In RM are mentioned just these interrupt sources:

pastedImage_1.png

Trigger which start ADC conversion is not connected to any interrupt request. 

Best regards,

Razvan

1,941 Views
dannydeng
Contributor III

Thanks, Razvan,

0 Kudos
Reply