S32K324 ADC interrupt execution time too long

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

S32K324 ADC interrupt execution time too long

436件の閲覧回数
witness248
Contributor II

Hi, experts

we are working on S32K324, and use pwm trigger ADC interrupt for every 28us in core1, inside ADC interrupt, we put some control logic code, but we found that the ADC interrupt execution time is near 24us(including ADC function plus our control logic), we measure the time via toggle pin,  so this issue will cause OS task delay. now we are using RTD SW32K3_S32M27x_RTD_R21-11_5.0.0. 

In our last project, we didn't implement autosar os in core1, and use SW32K3_RTD_4.4_2.0.0, the ADC interrupt execution time is only 12us. 

so what can we do to reduce ADC interrupt execution time? 

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

416件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@witness248

From your phenomenon, it seems that the clock distribution settings are different.

Have you checked whether the ADC clock settings are the same?

etc,"Core clock" and "Adc Prescaler Value".

Are the sampling parameter settings consistent, that is "Adc Unit Normal Sampling Duration x"?

0 件の賞賛
返信

406件の閲覧回数
witness248
Contributor II

hi, Senlent

Thanks for your reply. for ADC module clock, it is correct. and now we are planning to put the ADC ISR function into ITCM area, but I don't know how to do it, could give me some tutorial?

0 件の賞賛
返信

398件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@witness248

sure, the attachment is a tutorial on how to use TCM

0 件の賞賛
返信

390件の閲覧回数
witness248
Contributor II

hi, Senlent

I have already implement the method into my code, but it seems like no data in ITCM memory area, do you know the potential reason?

 

witness248_0-1750675147913.png

 

0 件の賞賛
返信

383件の閲覧回数
witness248
Contributor II

1. if I put itcm_text at the beginning of the SECTIONS, like below: 

witness248_1-1750676971181.png

it can compile pass, but no data at 0x00000000

2. If I put itcm_text at the below location: 

witness248_2-1750677144190.png

some compile errors happen.

witness248_0-1750676942631.png

 

0 件の賞賛
返信

350件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@witness248

Here is a demo in our knowledgebase, you can refer to it.

https://community.nxp.com/t5/S32K-Knowledge-Base/Example-Siul2-Port-Ip-Example-S32K344-ITCM-DTCM-S32...

There are many versions of RTD. The link files and startup files of each version may be different, but the principles are exactly the same. You must initialize before accessing

 

0 件の賞賛
返信