K22 + DMA + ADC + PDB with Processor Expert -- Multiple ADC Channels Scanning

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

K22 + DMA + ADC + PDB with Processor Expert -- Multiple ADC Channels Scanning

1,596 次查看
dhruvonline
Contributor III

Hi Friends,

I have to scan 5 channels with Kinetis K22 Device continuously. I have followed the PDB DMA K22 Steps shared(i.e AN4688 and DMA + ADC + PDB with Processor Expert (Kinetis K22 - MK22FN512VLH12) ).

But When I debug the Program, I am getting DEBUG HALT Message Continuously. Please have a look at the code and suggest the changes required.

Regds,

Dhruv

7 回复数

1,231 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi DHRUV A,

Debugging Hard Faults on ARM Cortex-M may help you find out what is causing the problem.
You can also attached your project here, so that we can check it.

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励

1,231 次查看
dhruvonline
Contributor III

Hi Robin,

Thanks for the suggestion. I have uploaded the project. Could you please check it out.

I will also check it as per the inputs shared.

Regds,

Dhruv

0 项奖励

1,231 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

According to the project setting, MK22FN1M0VLQ12 was selected. Please make sure you are using this Part Number, otherwise different hardware will cause hardfault. (Notice Kinetis K22F 120 MHz Family Mask Sets and Revision Numbers)

EB811.png

For example: I only have FRDM-K22F(MK22FN512VLH12) and TWR-K22F120M(K22FN512VDC12), so it will run into hardfault due to lack of MPU.

Cpu_ivINT_Hard_Fault.png

MK22FN512VLH12 don't have MPU.png

0 项奖励

1,231 次查看
dhruvonline
Contributor III

Hi Robin,

Thanks for the suggestion. I have tried with FRDM-K22 with KDS. Could you please check the attached project and suggest if anything is missing. I am not able to get the DMA interrupt. I need to measure 10 Channels continuously. Please suggest the modifications with the project attached for multiple channels scanning. 

Regards,

DHRUV

0 项奖励

1,231 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Input trigger select need to be set PDB_SWTRIG which means that PDB is triggered (started) by software only.

Input trigger select is set to PDB_SWTRIG.png

Then you are able to get the DMA interrupt.

1,231 次查看
dhruvonline
Contributor III

Hi Robin,

I have made the changes with another processor(MK22). I am using that MK22FX device. I have used same settings as freedom board. But it is going to DEBUG_HALT. Could you please suggest. I have attached the project.

Regards,

Dhruv

0 项奖励

1,231 次查看
dhruvonline
Contributor III

Hi Robin,

Thanks for the suggestion. Now I am getting the DMA interrupt and it is working. But when I debug multiple times, after some time it is going to PE_ISR(UnhandledInterrupt);
PE_ISR(UnhandledInterrupt)
{
PE_DEBUGHALT();
}.

Once again thanks for the help. I appreciate you for the active participation in this forum to use NXP tools and devices further. 

One more request, could you please suggest the modifications for the multiple channels measurement with this project.

Regards,

Dhruv

0 项奖励