This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

hard fault exception

I am generating optimsed code using simulink coder for LMS filter using stm32f4VG407 discovery board,KEIL MDK-ARM, but upon single conversion of signal through ADC , it is stopping at hardfault handler. fault report:
MM_FAULT_STAT:0x00
BUS_FAULT_STAT:0x04 i.e. IMPRECISERR IS HIGH
USG_FAULT_STAT:0x000
HARD_FAULT_STAT:0x4000000 i.e.FORCED IS HIGH
DBG_FAULT_STAT:0x00000001 i.e. HALTED IS HIGH

I am using Matlab 2013b & MDK_ARM 4.74
please help me how to get rid of this.

Parents
  • I am still struck in hard fault exception

    after running 36 times(i.e 36 adc conversions & hence 36 outputs at dac) the program is getting into hard fault exception from within this for loop:

     /* Update weights for the next input sample
         */
        j_0 = 0;
        for (j = (int32_T)*startIdx; j < wLen; j++) {
          prodMuErrX = accWtU * xBuf[j];
          prodMuErrX += mul_s32_s32_s32_sr30(leakFac, wBuf[j_0]);
          wBuf[j_0] = prodMuErrX;
          j_0++;
        }
    

    I even checked changing stack size but the number of conversions (i.e 36 ) was independent of change in stack size.

    Can somebody please help me regarding this?

Reply
  • I am still struck in hard fault exception

    after running 36 times(i.e 36 adc conversions & hence 36 outputs at dac) the program is getting into hard fault exception from within this for loop:

     /* Update weights for the next input sample
         */
        j_0 = 0;
        for (j = (int32_T)*startIdx; j < wLen; j++) {
          prodMuErrX = accWtU * xBuf[j];
          prodMuErrX += mul_s32_s32_s32_sr30(leakFac, wBuf[j_0]);
          wBuf[j_0] = prodMuErrX;
          j_0++;
        }
    

    I even checked changing stack size but the number of conversions (i.e 36 ) was independent of change in stack size.

    Can somebody please help me regarding this?

Children