How to configure OPWMCB to trigger ADC conversion using MCUXpresso

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

How to configure OPWMCB to trigger ADC conversion using MCUXpresso

2,140件の閲覧回数
MVR
Contributor V

Hello everyone,

I'm using S32K344 and S32K3 RTD AUTOSAR 4.4 2.0.1 D2207.

I would like to configure the PWM as OPWMCB (Center aligned Output PWM Buffered) using 6 aligned channels and notify via software or automatically trigger ADC conversion via hardware, occurring at the beginning of cycle as circled in the image below:

MarcusVR_0-1660684448226.png

I would like to use BCTU for trigger ADC conversion (recommended in application note), how I can configure using the MCUXpresso Config Tools?

Thanks.

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

2,117件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

theoretically, in OPWMCB mode you need to select the timebase using Bus Select (Cn[BSL]). The timebase you select must be running in Up Count-Down Count mode and this timebase define PWM period. The channel generating this timebase can be then used to trigger ADC conversions at period boundary. See MCB mode description to know more about flag generation in MCB Up Count-Down Count mode.

You can refer to below example for BTCU ADC triggering. PIT is used to trigger BTCU but you can add eMIOS and modify TRGMUX module to use eMIOS instead if PIT

https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-PIT-BTCU-ADC-DMA-DS3-4-RTD100/ta-p/...

BR, Petr

2,077件の閲覧回数
MVR
Contributor V

Hello @PetrS ,

I saw your example, I will test. If I define the timebase in EMIOS MCL being "Up Count-Down Count", is it enough to BCTU generate the trigger when I link with some EMIOS PWM channel?

I have read the document "AN13413 - ADC Guidelines Spec and Configuration" as well and I understand that there are two options for it:

1) EMIOS -> TRGMUX -> BCTU -> ADC

2) EMIOS -> BCTU -> ADC

Why we need of TRGMUX in this case? Really is it necessary?

Thanks,

MVR

0 件の賞賛
返信