Hard fault during access to FTM registers

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

Hard fault during access to FTM registers

973 Views
marcotrematerra
Contributor I

Hello All,

I'm working on MKE06Z128, IDE used is MCUXPresso V10.1 and I use the SDK, like debugger I use the PE Multilink.

As title of this request, every time I wish to access to FTM register the microcontroller goes to in hardfault.

For example:
FTM0->SC = 0x00;


when the microcontroller arrives at this line it goes to hard fault. I don't know why.

Is there someone who help me to solve that problem?

Best regards,
Marco

Labels (1)
2 Replies

807 Views
qu1j0t3
Contributor III

I have exactly the same problem, KE02Z, using Processor Expert and enabling FTM0.

No resolution yet.

0 Kudos

807 Views
mjbcswitzerland
Specialist V

Hi Marco

The only explanations for a hard fault here are:
1. The FTM clock gate hasn't been enabled before use.
2. The peripheral block address used to the FTM module is wrong.
3. A non-existent FTM module is being accessed.

Attached is a reference for the FRDM-KE06 which has a periodic interrupt in FTM0 (flashing red LED at 150ms half-period). Command line interface on OpenSDA VCOM at 115200 Baud.

Regards

Mark

Kinetis: http://www.utasker.com/kinetis.html
Kinetis KE:
- http://www.utasker.com/kinetis/FRDM-KE02Z.html
- http://www.utasker.com/kinetis/FRDM-KE02Z40M.html
- http://www.utasker.com/kinetis/FRDM-KE04Z.html
- http://www.utasker.com/kinetis/FRDM-KE06Z.html
- http://www.utasker.com/kinetis/FRDM-KE15Z.html
HW Timers: http://www.utasker.com/docs/uTasker/uTaskerHWTimers.PDF

Free Open Source solution: https://github.com/uTasker/uTasker-Kinetis
Working project in 15 minutes video: https://youtu.be/K8ScSgpgQ6M

For better, faster, cheaper product developments consider the uTasker developer's version, professional Kinetis support, one-on-one training and complete fast-track project solutions to set you apart from the herd : http://www.utasker.com/support.html