analogdevicesinc / ad5940-examples

AD594x related application examples and block level examples.
Other
71 stars 67 forks source link

Amperometric Hardfault #15

Open sebastian-schneider-eng opened 2 years ago

sebastian-schneider-eng commented 2 years ago

I have successfully integrated your examples into a STM32H7 and can perform the Amperometric measurement. I however realized, that if I am breaking the SW execution with the debugger, that a hardfault exception is occurring. The reason for that is that your Amperometric.c file is writing into memory areas which is not within the passed buffer. Possible work around:

  1. Add a size check here: https://github.com/analogdevicesinc/ad5940-examples/blob/08c233165e274bff877f5c1b9d5df49986da4a38/examples/AD5940_Amperometric/Amperometric.c#L438
  2. Changing APPBUFF_SIZE to 1024 which is reflecting the internal fifo size: https://github.com/analogdevicesinc/ad5940-examples/blob/08c233165e274bff877f5c1b9d5df49986da4a38/examples/AD5940_Amperometric/AD5940Main.c#L21
ajowsey commented 2 years ago

I'd second this: https://ez.analog.com/data_converters/precision_adcs/f/q-a/562507/fifo-count-rollover/473138

Read at the comment: "Another piece of useful information: "