Example S32K312 PIT BTCU parallel ADC FIFO DMA DS3.5 RTD300

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

Example S32K312 PIT BTCU parallel ADC FIFO DMA DS3.5 RTD300

Example S32K312 PIT BTCU parallel ADC FIFO DMA DS3.5 RTD300

This example for S32K312 is based on this, example on S32K344 :--
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-PIT-BTCU-parallel-ADC-FIFO-DMA-DS3-...


*******************************************************************************

 The purpose of this demo application is to present a usage of the
 ADC_SAR and BCTU IP Driver for the S32K3xx MCU.

 The example uses the PIT0 trigger to trigger BCTU conversion list to
 perform parallel conversions on ADC0/ADC1. Three ADC channels
 are selected to be converted on each ADC:
 ADC0: S8 , P0, S8
 ADC1: S10, S13, S17
 Converted results from BCTU FIFO are moved by DMA into result array.

 ADC channel S10 is connected to board's potentiometer.


 ------------------------------------------------------------------------------
* Test HW: S32K3X4EVB-Q172
* MCU: S32K312
* Compiler: S32DS3.5
* SDK release: RTD 3.0.0
* Debugger: PE Micro
* Target: internal_FLASH
********************************************************************************
Set PIT Freeze Enable :---

Dinesh_Guleria_0-1707202447324.png


BCTU will be do the parallel conversion for channel mentioned in BCTU list :--

Dinesh_Guleria_3-1707204479195.png

 

 

Dinesh_Guleria_1-1707202600904.png

 

"NEW DATA DMA enable mask" :--
controls These bit field in MCR register

Dinesh_Guleria_0-1707203759290.png

 

 

"ADC target mask" :--

It controls "ADC_SEL " bit field in "Trigger Configuration (TRGCFG_0 - TRGCFG_71)"

for single conversions you can enable only one instance
so the possible values for target mask:
1 (0b001) ADC0
2 (0b010) ADC1
3 (0b100) ADC2|

for list of conversions we can enable also parallel con version
for example
3 (0b011) parallel conversion of ADC0 and ADC1


The trigger is configured as a list of parallel conversions ADC0, ADC1 in “Adc Target Mask”.
List of ADC channels is defined in “BCTU List Items” while order is given by the “Adc Target Mask”: BctuListItems_0 is ADC0, BctuListItems_1 is ADC1 etc.

 

Dinesh_Guleria_3-1707204011310.png



Dinesh_Guleria_4-1707204043898.png

 

Dinesh_Guleria_2-1707203974137.png



Result :--
I connected VDD from board on adc_0_p0 (PTD1 : J412-1)  and adc_1_p2 (PTE0 J412-13).
Also POT value on S10 of ADC-1 & ADC-0-VREFH value coming correct & STABLE.

Dinesh_Guleria_1-1707330412160.png

 

 

Dinesh_Guleria_0-1707330375235.png




=========================Using  FIFO-2 =================

Dinesh_Guleria_0-1732514437470.png



FIFO-2 Trigger & LIST Index :--

Dinesh_Guleria_1-1732514506589.png



Dinesh_Guleria_2-1732514539640.png


ADC channel conversion :--

Dinesh_Guleria_3-1732514707504.png





添付
評価なし
バージョン履歴
最終更新日:
‎11-24-2024 11:05 PM
更新者: