ADC Notification not getting called in S32K144 MCU

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

ADC Notification not getting called in S32K144 MCU

105 Views
gkunalupta
Contributor III

In ADC peripheral for S32K1xx MCU's, there are ADC Status and Control Register 1 (SC1A - aSC1P). Onto which ADC channel number and its conversion complete status is represented by bits ADCH and COCO.

Now COCO bit is set 1, when ADC conversion of channel reprsented by ADCH bits is completed.

And COCO bit is set to 0, only when respective Result register of channel ADCH is read( Registers RA-RP) or when respective SC1n register is written.

gkunalupta_2-1725212886646.png

 

But, in my demo. ADC channel COCO bits does get set and ADC IRQ is invoked, but when i step into my IRQ handler to debug it. My COCO bit is getting cleared on its own. Why is it sooo???

You can see below figure:

IRQ is hit and COCO bit is 1

gkunalupta_0-1725212308864.png

 

But as i step into Interrupt, COCO bit gets cleared automatically. Without reading any Result register or I have not performed any write operation on SC1n register.

gkunalupta_1-1725212361297.png

 

As a result IRQ does not callback notification function at line 1103. Because IRQ checks the COCO bit of SC1n registers to check which channel is interrupted.

 

COCO bit of SC1n register of ADC peripheral is getting cleared onb its own without reading any result register or performing any write operation on SC1n registers.

 

Why is it soo??? Is their something wrong mentioned in datasheet? or somerthing wrong in ADC IRQ handler??

 

 

0 Kudos
Reply
2 Replies

75 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this can be caused by displaying Result registers so debugger is reading them.
Try to do not display result registers or other ADC registers as well.

BR, Petr

0 Kudos
Reply

67 Views
gkunalupta
Contributor III

Okay great, though i was not reading any result register. But i was reading multiple variables and have set inbetween breakpoints. 

But when i remove those breakpoints and variables, its starts working as expected.

 

But have got one more dout. I want to use PDB Channel Delay feature. /but am not able to get from where to enable ADC Delay Next PDB, in GUI.

gkunalupta_0-1725297028429.png

 

I checked on ADC UM manual of S32K1xx, this feature is supported on it. But i cant find from where to enable this feature.

 

gkunalupta_1-1725297088963.png

 

 

0 Kudos
Reply