AnsweredAssumed Answered

Library File - Hard Fault

Question asked by depue.fraser on Jan 28, 2013
Latest reply on Jan 29, 2013 by lightning
Hello All, 
I have recently started working with the STM32F0, and am trying to implement a PDM Microphone. In order to do this, I am using a library file provided by ST which has some functions for filtering PDM data. 

I am currently using IAR for development, and I have found that when I include the library and use one of the functions from it, when I go into debugging mode, the processor immediately goes into the HardFault_Handler. Normally, debugging would stop at the first instruction and you have to press play to start the program, but this jumps to the hardfault before ever reaching that first instruction. 

This occurs only when my program uses a function from the library; if I have the library added but no functions are called, it goes into debugging mode normally and runs fine. 

I have seen references to this maybe relating to the fact the library could be using ARM instructions. I am unsure if this is the issue, and if it is, I am unsure how to fix the problem, specifically in IAR. If anyone knows what might be going on, or how to fix this, any help would be appreciated. Thanks in advance. 

The library I am using is libPDMFilter_IAR.a, with pdm_filter.h, which are files provided directly from ST.

Specs:
Windows 7, 64 bit.
IAR Embedded Workbench for ARM v6.40.4.4221

Outcomes