Hi,
I’m working on the NXP i.MXRT1064 EVK and reading an Audio Noise Sensor output using the internal ADC.
ADC pin: GPIO_AD_B1_02 (ADC1 channel / ADC1_IN7)
The program runs fine most of the time, but at unpredictable times, it randomly enters a BusFault/HardFault (check screenshot attached). The fault does not occur at a consistent point in time, which makes it difficult to reproduce. Why is this fault occuring and how to go about in resolving this fault.
Hi @Subhasri ,
Thank you so much for your interest in our products and for using our community.
Based on the information your provided, it is difficult to determine the exact root cause of the BusFault/HardFault.
I suggest checking the following points:
1: Memory and stack usage
Check whether there is stack overflow or out‑of‑bounds memory access.
2: Cache and DMA coherency
If ADC is used with DMA, please ensure that DMA buffers are allocated in non‑cacheable memory (for example using AT_NONCACHEABLE_SECTION_ALIGN).
3: Isolate the issue using a minimal test case
I suggest you can try to temporarily disable part of the application code and check step by step.
For example, only reading the Audio Noise Sensor or use internal ADC output, confirm whether the issue can be reproduced.
Best Regards
MayLiu