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
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!
-----------------------------------------------------------------------------------------------------------------------
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
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)
For example: I only have FRDM-K22F(MK22FN512VLH12) and TWR-K22F120M(K22FN512VDC12), so it will run into hardfault due to lack of MPU.
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
Input trigger select need to be set PDB_SWTRIG which means that PDB is triggered (started) by software only.
Then you are able to get the DMA interrupt.
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
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