how to config adc and pdb for multiple channels

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

how to config adc and pdb for multiple channels

941件の閲覧回数
Jimny
Contributor II

Hello, I'm trying to modify the code from the official motor control demo.

The original demo uses 3 ADC channels, and I want to add an additional channel. Please see the table below.

original  expected  
pinadc channelphysical signalpinadc channelphysical signal
   PTA6ADC0_SE2i_ph_c
PTB1ADC1_SE15i_ph_bPTB1ADC1_SE15i_ph_b
PTB0ADC0_SE4i_ph_aPTB0ADC0_SE4i_ph_a
PTB12ADC1_SE7v_busPTB12ADC1_SE7v_bus

 

Here is what I have changed in processor expert.

1.PNG

add configuration for adc0_se2

2.PNG

add the associated pdb configuration

3.PNG

modify the adc peripheral configuration

4.PNG

modify the pdb peripheral configuration

You can find the archive file of the project in the attachment.

When I flash the binary file to the official demo kit, an error occurs, the software falls into  the default ISR.

Can anyone helps to find the root cause?

By the way, I have disabled the adc interleave and the test result is ok, the motor can run.

ラベル(1)
0 件の賞賛
返信
1 返信

926件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Jimny

     I double checked your configuration and found no problem, I suggest that you can try single-step debugging first, locate the step where the exception occurred, send me a screenshot of the picture, and then I'll check if there is anything I haven't considered arrive.

    You can also refer to the ADC pre-trigger configuration of the MCSPTE1AK144_BLDC_6Step,this routine can also be found in your install path,

0 件の賞賛
返信