S32k322 ADC Dual Purpose issue in S32Design studio

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

S32k322 ADC Dual Purpose issue in S32Design studio

Jump to solution
411 Views
praveen_ext
Contributor II

Hi, 

I am using ADC1 for a dual purpose. I have configured two channels for high-speed current sensing, which required enabling a specific 'control mode.' However, I also need to use several other channels on the same ADC for voltage and temperature sensing, configured for 'normal chain conversion,' and these channels are currently not working. What is the cause of this conflict, and If any possible to use ADC for Dual purpose?" here by attached configuration images FYR.

Chip is s32k322 series

Tags (2)
0 Kudos
Reply
1 Solution
367 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this is what I wrote, in BCTU control mode, the normal conversion cannot be started. You need to change setting to use "Trigger mode" for Adc Ctu Mode option

BR, Petr

View solution in original post

4 Replies
379 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

seems no config images are attached here.
Anyway, if the ADC is configured in BCTU control mode (MCR[BCTU_MODE] = 0), only the BCTU can start a conversion. All other trigger sources are ignored. 
In Trigger mode (MCR[BCTU_MODE] = 1), normal and injected conversions can also be performed. All types of conversions can be initiated in this mode. The priorities among the three types of conversions are discussed in chapter 60.3.6.1 BCTU Trigger mode of the device RM.

BR, Petr

0 Kudos
Reply
372 Views
praveen_ext
Contributor II

control modecontrol modeNormal ChainNormal Chain
Sorry, I've now attached the configuration images. The issue is that when I enable the control mode for current sensing, the normal chain conversion (for voltage and temperature) stops working. I am using ADC1 for a dual purpose. This is the main reason I am asking: is it possible to configure and use ADC1 for a dual purpose—specifically, utilizing both the control mode (for current sensing) and the normal chain conversion (for voltage/temperature sensing) simultaneously?

Tags (1)
0 Kudos
Reply
368 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this is what I wrote, in BCTU control mode, the normal conversion cannot be started. You need to change setting to use "Trigger mode" for Adc Ctu Mode option

BR, Petr

211 Views
praveen_ext
Contributor II

Hi @PetrS ,

I configured the 14‑bit ADC for internal temperature sensing, but the RTD temperature sensing macro is defined only for 12‑bit resolution and uses a 12‑bit temperature instance in Adc_Sar_Ip.h and Adc_Sar_Ip.c. Because of this, the calculated temperature, raw ADC reading, and measured voltage are oscillating and not correct. Should the RTD function automatically switch to 14‑bit when I configure 14‑bit ADC, or do I need to define a 14‑bit resolution macro and update the API function manually? here by attached images for your reference.
RTD Function Defined MacrosRTD Function Defined MacrosCalculated ValueCalculated ValueConfiguration tabConfiguration tab

Tags (1)
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2253692%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32k322%20ADC%20Dual%20Purpose%20issue%20in%20S32Design%20studio%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2253692%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20ADC1%20for%20a%20dual%20purpose.%20I%20have%20configured%20two%20channels%20for%20high-speed%20current%20sensing%2C%20which%20required%20enabling%20a%20specific%20'%3CSTRONG%3Econtrol%20mode%3C%2FSTRONG%3E.'%20However%2C%20I%20also%20need%20to%20use%20several%20other%20channels%20on%20the%20same%20ADC%20for%20voltage%20and%20temperature%20sensing%2C%20configured%20for%20'%3CSTRONG%3Enormal%20chain%20conversion%3C%2FSTRONG%3E%2C'%20and%20these%20channels%20are%20currently%20not%20working.%20What%20is%20the%20cause%20of%20this%20conflict%2C%20and%20If%20any%20possible%20to%20use%20ADC%20for%20Dual%20purpose%3F%22%20here%20by%20attached%20configuration%20images%20FYR.%3C%2FP%3E%3CP%3EChip%20is%20s32k322%20series%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2254245%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32k322%20ADC%20Dual%20Purpose%20issue%20in%20S32Design%20studio%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2254245%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3Ethis%20is%20what%20I%20wrote%2C%20in%20BCTU%20control%20mode%2C%20the%20normal%20conversion%20cannot%20be%20started.%20You%20need%20to%20change%20setting%20to%20use%20%22Trigger%20mode%22%20for%20Adc%20Ctu%20Mode%20option%3C%2FP%3E%0A%3CP%3EBR%2C%20Petr%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2254226%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32k322%20ADC%20Dual%20Purpose%20issue%20in%20S32Design%20studio%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2254226%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22control%20mode%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22control%20mode%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22control%20mode%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22control%20mode%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F368433i5B9078058394E7A9%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202025-12-03%20174030.png%22%20alt%3D%22control%20mode%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Econtrol%20mode%3C%2Fspan%3E%3C%2Fspan%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Econtrol%20mode%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Econtrol%20mode%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Econtrol%20mode%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Normal%20Chain%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Normal%20Chain%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Normal%20Chain%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Normal%20Chain%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F368434i8EB75761A2711877%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202025-12-03%20174231.png%22%20alt%3D%22Normal%20Chain%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ENormal%20Chain%3C%2Fspan%3E%3C%2Fspan%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ENormal%20Chain%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ENormal%20Chain%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ENormal%20Chain%3C%2FSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3ESorry%2C%20I've%20now%20attached%20the%20configuration%20images.%20The%20issue%20is%20that%20when%20I%20enable%20the%20%3CSTRONG%3Econtrol%20mode%3C%2FSTRONG%3E%20for%20current%20sensing%2C%20the%20%3CSTRONG%3Enormal%20chain%20conversion%3C%2FSTRONG%3E%20(for%20voltage%20and%20temperature)%20stops%20working.%26nbsp%3BI%20am%20using%20ADC1%20for%20a%20dual%20purpose.%26nbsp%3BThis%20is%20the%20main%20reason%20I%20am%20asking%3A%20is%20it%20possible%20to%20configure%20and%20use%20ADC1%20for%20a%20dual%20purpose%E2%80%94specifically%2C%20utilizing%20both%20the%20%3CSTRONG%3Econtrol%20mode%3C%2FSTRONG%3E%20(for%20current%20sensing)%20and%20the%20%3CSTRONG%3Enormal%20chain%20conversion%3C%2FSTRONG%3E%20(for%20voltage%2Ftemperature%20sensing)%20simultaneously%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2254023%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32k322%20ADC%20Dual%20Purpose%20issue%20in%20S32Design%20studio%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2254023%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3Eseems%20no%20config%20images%20are%20attached%20here.%3CBR%20%2F%3EAnyway%2C%20if%20the%20ADC%20is%20configured%20in%26nbsp%3BBCTU%20control%20mode%20(MCR%5BBCTU_MODE%5D%20%3D%200)%2C%20only%20the%20BCTU%20can%20start%20a%20conversion.%20All%20other%20trigger%20sources%20are%20ignored.%26nbsp%3B%3CBR%20%2F%3EIn%20Trigger%20mode%20(MCR%5BBCTU_MODE%5D%20%3D%201)%2C%20normal%20and%20injected%20conversions%20can%20also%20be%20performed.%20All%20types%20of%20conversions%20can%20be%20initiated%20in%20this%20mode.%20The%20priorities%20among%20the%20three%20types%20of%20conversions%20are%20discussed%20in%20chapter%2060.3.6.1%20BCTU%20Trigger%20mode%20of%20the%20device%20RM.%3C%2FP%3E%0A%3CP%3EBR%2C%20Petr%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2256880%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32k322%20ADC%20Internal%20Temperature%20issue%20in%20S32Design%20studio%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2256880%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F52961%22%20target%3D%22_blank%22%3E%40PetrS%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EI%20configured%20the%2014%E2%80%91bit%20ADC%20for%20internal%20temperature%20sensing%2C%20but%20the%20RTD%20temperature%20sensing%20macro%20is%20defined%20only%20for%2012%E2%80%91bit%20resolution%20and%20uses%20a%2012%E2%80%91bit%20temperature%20instance%20in%20Adc_Sar_Ip.h%20and%20Adc_Sar_Ip.c.%20Because%20of%20this%2C%20the%20calculated%20temperature%2C%20raw%20ADC%20reading%2C%20and%20measured%20voltage%20are%20oscillating%20and%20not%20correct.%20Should%20the%20RTD%20function%20automatically%20switch%20to%2014%E2%80%91bit%20when%20I%20configure%2014%E2%80%91bit%20ADC%2C%20or%20do%20I%20need%20to%20define%20a%2014%E2%80%91bit%20resolution%20macro%20and%20update%20the%20API%20function%20manually%3F%20here%20by%20attached%20images%20for%20your%20reference.%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22RTD%20Function%20Defined%20Macros%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22RTD%20Function%20Defined%20Macros%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F368907i6FCD637BABA8D2A6%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202025-12-08%20130114.png%22%20alt%3D%22RTD%20Function%20Defined%20Macros%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ERTD%20Function%20Defined%20Macros%3C%2Fspan%3E%3C%2Fspan%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ERTD%20Function%20Defined%20Macros%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Calculated%20Value%22%20style%3D%22width%3A%20562px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Calculated%20Value%22%20style%3D%22width%3A%20562px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F368908iC06848D51DC19860%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202025-12-08%20131243.png%22%20alt%3D%22Calculated%20Value%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ECalculated%20Value%3C%2Fspan%3E%3C%2Fspan%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ECalculated%20Value%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Configuration%20tab%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Configuration%20tab%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F368909i21E9D91CC7A7B4FE%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202025-12-08%20131422.png%22%20alt%3D%22Configuration%20tab%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EConfiguration%20tab%3C%2Fspan%3E%3C%2Fspan%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EConfiguration%20tab%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E