AnsweredAssumed Answered

K22FX & FTM KSDK crash

Question asked by Marco Hess on Dec 7, 2014
Latest reply on Dec 8, 2014 by Anthony Huereca

By accident I ended up with a K22FX512 on my board instead of the intended K22FN512

 

As far as I can tell they look pin compatible but have subtle changes inside and no KSDK support for them :-(

 

While I wait for the correct part to arrive I need to get this board running with the K22FX but are bumping into a problem with the FTM.

 

I try to use FTM3 CH7 as a single PWM output but when I try to use FTM_DRV_Init, I end up in the Default_Handler and watchdog reset in fsl_ftm_hal.c on HW_FTM_CNT_WR(ftmBaseAddr, 0);

 

From the documentation of the K22FX, it appears that the base address of FTM3 has changed compared to the K22FN and I tried patching the FTM3_BASE addresses in C:\Freescale\KSDK_1.0.0\platform\CMSIS\Include\device\MK22F51212\MK22F51212.h like so:

 

#define FTM3_BASE                                (0x400B9000u) /* (0x40026000u) */

 

but without much success as it still crashes.

 

Any pointers as to how to get FTM3 working on the K22FX?

Outcomes