Bus Fault IMPRECISERR

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

Bus Fault IMPRECISERR

778 Views
Subhasri
Contributor I

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.

Labels (1)
0 Kudos
Reply
1 Reply

727 Views
mayliu1
NXP Employee
NXP Employee

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

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2297820%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBus%20Fault%20IMPRECISERR%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2297820%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3CBR%20%2F%3EI%E2%80%99m%20working%20on%20the%20%3CSTRONG%3ENXP%20i.MXRT1064%20EVK%3C%2FSTRONG%3E%20and%20reading%20an%20%3CSTRONG%3EAudio%20Noise%20Sensor%3C%2FSTRONG%3E%20output%20using%20the%20%3CSTRONG%3Einternal%20ADC%3C%2FSTRONG%3E.%3C%2FP%3E%3CP%3E%3CSTRONG%3EADC%20pin%3A%3C%2FSTRONG%3E%20GPIO_AD_B1_02%20(ADC1%20channel%20%2F%20ADC1_IN7)%3C%2FP%3E%3CP%3EThe%20program%20runs%20fine%20most%20of%20the%20time%2C%20but%20at%20unpredictable%20times%2C%20it%20%3CSTRONG%3Erandomly%20enters%20a%20BusFault%2FHardFault%20%3C%2FSTRONG%3E%26nbsp%3B(check%20screenshot%20attached).%20The%20fault%20does%20not%20occur%20at%20a%20consistent%20point%20in%20time%2C%20which%20makes%20it%20difficult%20to%20reproduce.%20Why%20is%20this%20fault%20occuring%20and%20how%20to%20go%20about%20in%20resolving%20this%20fault.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2297820%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EEvaluation%20Board%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2298125%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Bus%20Fault%20IMPRECISERR%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2298125%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F259044%22%20target%3D%22_blank%22%3E%40Subhasri%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EThank%20you%20so%20much%20for%20your%20interest%20in%20our%20products%20and%20for%20using%20our%20community.%3C%2FP%3E%0A%3CDIV%3E%0A%3CP%3EBased%20on%20the%20information%20your%20provided%2C%20it%20is%20difficult%20to%20determine%20the%20exact%20root%20cause%20of%20the%20BusFault%2FHardFault.%3C%2FP%3E%0A%3CP%3EI%20suggest%26nbsp%3B%20checking%20the%20following%20points%3A%3C%2FP%3E%0A%3CP%3E1%3A%20Memory%20and%20stack%20usage%3C%2FP%3E%0A%3CP%3ECheck%20whether%26nbsp%3B%20there%20is%26nbsp%3B%20stack%20overflow%20or%20out%E2%80%91of%E2%80%91bounds%20memory%20access.%3C%2FP%3E%0A%3CP%3E2%3A%26nbsp%3B%3CSPAN%3ECache%20and%20DMA%20coherency%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIf%20ADC%20is%20used%20with%20DMA%2C%20please%20ensure%20that%20DMA%20buffers%20are%20allocated%20in%20non%E2%80%91cacheable%20memory%20(for%20example%26nbsp%3B%20using%20AT_NONCACHEABLE_SECTION_ALIGN).%3C%2FP%3E%0A%3CP%3E3%3A%26nbsp%3B%3CSPAN%3EIsolate%20the%20issue%20using%20a%20minimal%20test%20case%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI%20suggest%20you%20can%20try%20to%20temporarily%20disable%20part%20of%20the%20application%20code%20and%20check%20step%20by%20step.%3C%2FP%3E%0A%3CP%3EFor%20example%2C%26nbsp%3B%20only%20reading%20the%20Audio%20Noise%20Sensor%20or%26nbsp%3B%20use%20internal%20ADC%20output%2C%26nbsp%3B%20%26nbsp%3Bconfirm%20whether%20the%20issue%20can%20be%20reproduced.%3C%2FP%3E%0A%3CP%3EBest%20Regards%3C%2FP%3E%0A%3CP%3EMayLiu%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E