AnsweredAssumed Answered

Why am I getting an interrupt when I try to set the Open Drain Enable bit for Port C bit 10 (address 0x4004b028 bit 5)?

Question asked by Aric Blumer on Sep 25, 2015
Latest reply on Sep 25, 2015 by Aric Blumer

I am new to KSDK and Kinetis processors, but I have I2C working except that the Processor Expert code is not properly setting the Open Drain Enable bit for the SDA and SCL pins. When I try to set the bit in my code, an interrupt occurs. This is in a "bare metal" system. I'm trying to set the bit like this:

 

volatile uint32_t *portc10 = (void *)0x4004b028;

 

*portc10 |= (1 << 5);

 

The interrupt occurs when portc10 is dereferenced.

 

I have no idea why this is happening unless there is memory protection being turned on by something, but that should be the case in a bare metal (standalone) platform. If so, how do I turn it off so I can set this bit?

 

Thanks,

Aric.

Outcomes