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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

2,231 次查看
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 项奖励
回复
1 回复

1,966 次查看
andreaolivieri1
Contributor II

HW fault handler in peripheral access.

Check this one up.

Seems very close to the problem I had.

0 项奖励
回复