Problem with ADC and BCTU - S32K344

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Problem with ADC and BCTU - S32K344

跳至解决方案
2,059 次查看
MVR
Contributor III

Hello everyone,

1) When I try to setup the ADC to work together BCTU, the setup only works if we using ADC_0 and BCTU_0.

If I change ADC_0 to ADC_1, the notification doesn't work.

I used the example "Adc_Sar_Bctu_Ip_example_S32K344", this example is configured using ADC_0, BCTU_EMIOS_0_0 and BCTU_FIFO1. If I change the ADC_0 to ADC_1 it doesn't work. Why is it occur? (I am testing the part 2 of this example "Part 2: The sequences of conversion is triggered using SW triggering from BCTU, the ADC results are stored in FIFO index 1").

2) About another point, I would like to read the 3 ADC instances in the same time, I understand what we need to configure each instance with different channel of BCTU, for example:

ADC_0 - BCTU_EMIOS_0_0

ADC_1 - BCTU_EMIOS_0_1

ADC_2 - BCTU_EMIOS_0_2

Is it correct?

3) And about the BCTU_FIFO1, we need to use different FIFO for each setup to read the ADC instances in the same time or we can use only BCTU_FIFO1 in all setups?

I asked it because there are only two options (FIFO1 and FIFO2) and three ADC instances (ADC_0, ADC_1 and ADC_2). Such as:

ADC_0 - BCTU_EMIOS_0_0 - BCTU_FIFO1

ADC_1 - BCTU_EMIOS_0_1 - BCTU_FIFO1

ADC_2 - BCTU_EMIOS_0_2 - BCTU_FIFO1

Or

ADC_0 - BCTU_EMIOS_0_0 - BCTU_FIFO1

ADC_1 - BCTU_EMIOS_0_1 - BCTU_FIFO2

ADC_2 - BCTU_EMIOS_0_2 - ???

Thanks,

Marcus

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,990 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

1) most probably you forgot to modify BCTU trigger config to use ADC1 instead of ADC0, refer to "Adc Target Mask" item. it is a mask, so value 1 is ADC0, 2 is ADC1 and 4 is ADC2

PetrS_0-1660549049886.png

2) Two options could be there. Either you define 3 BCTU triggers, triggered from different triggers (eMIOS channels) and pointing to different ADC modules, as you outlined.
Second option could be using of BCTU conversion list, that can be triggered from single trigger input and parallel conversion can be done. See more in chapter 62.12 Multiple parallel conversions (MPC) of the RM.

3) you can use single FIFO for all 3 conversions or any combination. A read from FIFO Data register contains the ADC conversion result and information about the conversion (ADC channel, Trigger source, ADC number). Also there are ADC-specific data registers, single for each ADC module.
So you can choose where ADC conversion will be stored, refer to DATA_DEST field of Trigger Configuration register (TRGCFG_n).

BR, Petr 

 

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,991 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

1) most probably you forgot to modify BCTU trigger config to use ADC1 instead of ADC0, refer to "Adc Target Mask" item. it is a mask, so value 1 is ADC0, 2 is ADC1 and 4 is ADC2

PetrS_0-1660549049886.png

2) Two options could be there. Either you define 3 BCTU triggers, triggered from different triggers (eMIOS channels) and pointing to different ADC modules, as you outlined.
Second option could be using of BCTU conversion list, that can be triggered from single trigger input and parallel conversion can be done. See more in chapter 62.12 Multiple parallel conversions (MPC) of the RM.

3) you can use single FIFO for all 3 conversions or any combination. A read from FIFO Data register contains the ADC conversion result and information about the conversion (ADC channel, Trigger source, ADC number). Also there are ADC-specific data registers, single for each ADC module.
So you can choose where ADC conversion will be stored, refer to DATA_DEST field of Trigger Configuration register (TRGCFG_n).

BR, Petr 

 

 

0 项奖励
回复