MK64FX512 freezes with RTC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MK64FX512 freezes with RTC

Jump to solution
1,238 Views
Oliveira
Contributor III

Hi,

I´ve made a board based on FRDM-K64F

It has 50MHz from PHY and 32768KHZ from an external smt crystal. I can confirm enet, usb and sd card are working, all as expected but RTC. When internal 32768KHZ is selected it works normal.

I have tried capacitors and pth crystal as well with no avail.

Some advice? I can share schematics is needed.

 

Marco

0 Kudos
Reply
1 Solution
1,196 Views
Oliveira
Contributor III

Hi Robin,

I can´t measure the wave form but I´ve changed the project to toggle a LED and uploaded the axf file to the board.

It´s working now, I don´t exacly know what was wrong but I am going to further study the code to try to grasp it.

Thank you very much for your time and readiness.

Best regards.

Marco

 

View solution in original post

0 Kudos
Reply
4 Replies
1,227 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Oliveira,

Did you enable the RTC_CR[OSCE]?

RTC_CR[OSCE].jpg
You can refer the rtc example in SDK_2.9.0_MK64FX512xxx12.

rtc SDK example.jpg

Please check if XTAL32 and EXTAL32 are well connect to the external 32768KHZ crystal. No external load capacitors or bias resistor is required as these are supplied internally.


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
1,218 Views
Oliveira
Contributor III

Hi Robin,

I did 

RTC_DRV_Init(0);
RTC->CR |= RTC_CR_OSCE_MASK; // Enable Oscillator

Not working yet.

I am not using external capacitors.

Marco

 

 

0 Kudos
Reply
1,202 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Would you please measure if the external 32768KHZ crystal is well solder.(Using a multimeter to measure whether the pins of the MCU and the pins of the external crystal are connected)
In order to not use external 50MHz reference clock(for your convenience when testing) I modify frdmk64f_rtc example.

modified RTC example.jpg
Please try to test the attached example.
You should be able to see the waveform at the pins of crystal.(using oscilloscope with 10X probe )

NewFile0.bmp


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
1,197 Views
Oliveira
Contributor III

Hi Robin,

I can´t measure the wave form but I´ve changed the project to toggle a LED and uploaded the axf file to the board.

It´s working now, I don´t exacly know what was wrong but I am going to further study the code to try to grasp it.

Thank you very much for your time and readiness.

Best regards.

Marco

 

0 Kudos
Reply