The Freedom-K64F is an ultra-low-cost development platform for Kinetis K64, K63, and K24 MCUs.

Access to K64F Port Control Registers

21 Mar 2016

Hi, I am experimenting with a FRDM-K64F and wanted to check on the Port Control Registers. I wrote a little program to print out some of the fields. This works fine for ports A and B, but fails (stops producing output) if I try to access port C. I've no idea why that should be, as they're memory mapped registers at nearby addresses. Any ideas?

29 Mar 2016

I found the answer myself, after further reading of the 1789-page tome that is the K64 Sub-Family Reference Manual. In section 4.5 “Modules that are disabled via their clock gate control bits in the SIM registers disable the associated AIPS slots.” And 12.2.12 tells us that SIM_SCGC5 bits 9..13 “control the clock gate to the Port n module”.

Sure enough, reading SIM_SCGC5 revealed that the bits for ports A and B were set but not those for C, D or E. Setting these bits allowed access to the other Port Control Registers.

Please log in to post a reply.