4 years, 5 months ago.

KL05Z PTB13 behavior

I am trying to use PTB13 (A5) on the KL05Z as a digital output, but I always see the RTC 32kHz signal with about 1.25V peak to peak signal added to the output level. I have tried it on two different KL05Z boards and the behavior is the same. What is going on here? I do notice in the FRDM-KL05Z schematic that this pin is also connected to the open-sda interface.

Thanks, Tom

Comment on this question

1 Answer

4 years, 5 months ago.

Most freescale MCUs have no 32kHz crystal for their RTC, so the interface chip generates a 32kHz signal instead. However the KL05 has a 32kHz crystal, so it is not required. Seems someone put a setting wrong.

I agree about the setting but don't know what is wrong. I tried a FRDM-KL05Z board right out of the box and PTB13 stays at 0V output.

posted by Tom Russell 01 Apr 2015

Yeah it is the mbed firmware which does it. And it should not do it.

posted by Erik Olieman 01 Apr 2015

The odd thing about the signal was that was not the full 3V peak to peak so I looked at the FRDM-KL05Z schematic. PTB13 signal is also tield to pin 31 of the OPEN-SDA interface controller through R11. I removed R11 and the problem is solved. I checked with a scope and the 32kHz signal is coming from the OPEN-SDA chip and not from the KL05Z. Not sure of the purpose of this signal, but it looks like we might need an OPEN-SDA firmware update rather than a change to the mbed compiled code.

posted by Tom Russell 01 Apr 2015

Looking at the FRDM-KL25Z schematic, it looks like pin 31 is used to provide the 32kHz RTC to the KL25Z, BUT in that case it is correctly tied to the RTC_CLKIN pin, not the RTC_CLKOUT pin as it is on the FRDM-KL05Z board. Of course the KL05Z does not need it at all.

posted by Tom Russell 01 Apr 2015

You need to log in to post a question