AnsweredAssumed Answered

Disable reset and NMI pins on MKL16Z128

Question asked by Magnus Lundell on Nov 26, 2015
Latest reply on Nov 30, 2015 by Magnus Lundell

Hello!

I have a custom board where I need both NMI and reset pin.

I use KDS 3.0.0 and I am not using processorexpert. Debugger is Jlink. Everything else is working fine as long as these pins stays inactive.

I tried the following code in an header file:

 

typedef struct stKINETIS_FLASH_CONFIGURATION                      // loaded from FLASH 0x00000400 at reset

{

     unsigned char  ucBackdoorComparisonKey[8];

     unsigned char  ucProgramFlashProtection[4];

     unsigned char  reserved1;

     unsigned char  reserved2;

     unsigned char  ucNonvolatileOption;

     unsigned char  ucDataFlashSecurity;

} KINETIS_FLASH_CONFIGURATION;

 

const KINETIS_FLASH_CONFIGURATION __attribute__((section(".f_config"))) __flash_config

= {

       0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,

     0xff,0xff,0xff,0xff,
     0xff,
     0xff,
     0b11110011,  //disable nmi and reset
     0b11111110  //unsecure

};

 

This does not seem to have any effect, reading memory location 0x040D gives 0xFF and pins are still active.

 

Is there something that owerrides this or what have I missed?

 

Best regards

Magnus Lundell

Finland

Outcomes