Why do I get HardFault when using internal clock with FTM PWM on S32K144?

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

Why do I get HardFault when using internal clock with FTM PWM on S32K144?

1,121 Views
samerbastawy
Contributor I

I want to output a PWM signal using the FlexTimer, but when I configure my project and debug, it goes to HardFault Handler when the FTM driver initializes its clock. 
Notes on my project:
1. Uses IAR 7.3 toolchain & I am debugging on IAR workbench 8.0

2. No external oscillator. (No SOSC nor SPILL)

3. All clocks are disabled other than SIRC (2 MHz) and FIRC (60 MHz)

4. Tried the three options in FTM Clock source (System clock, Fixed Frequency and External Clock). All go to HardFault Handler.

5. Tried all four debug Mode in FTM configurations (Mode0-3). All go to HardFault.

6. Target is PS32K144U

Note that the PWM signal works fine on the evaluation board using external Oscillator. I am now trying on my own project board which has no external oscillator.

Project is attached. Please help or enlighten me for any configurations that I should take care of.
Thanks :smileyhappy:

0 Kudos
1 Reply

856 Views
andreaolivieri1
Contributor II

HW fault handler in peripheral access.

Check this one up.

Seems very close to the problem I had.

0 Kudos