RTC_GetStatusFlags results in hard fault

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RTC_GetStatusFlags results in hard fault

ソリューションへジャンプ
1,793件の閲覧回数
bartrijvers
Contributor III

Hello people,

We have 2 custom developed boards containing the same K26 processor. Both boards share many of the same components, while the 2nd board lacks some. The XTAL0 is a 16 MHz component, the same for both boards, connected via 0 ohm resistors on one board and lacking these resistors on the other.

The XTAL32 is fed with a 32.768 oscillator, the same component and circuitry for both devices.

Now the weird this is that the production test code successfully initializes the internal RTC on board 1 and gets into a hard fault on board 2 with the call to RTC_GetStatusFlags() in the RTC_Init() function.

The same thing can be reproduced (consistantly) with the rtc_func_twr65f180m example in SDK 2.2.

I attached a Kinetis debugger output of the production test, where I have a hard-fault hardler installed.

What could be causing this ?

ラベル(2)
0 件の賞賛
返信
1 解決策
1,512件の閲覧回数
bartrijvers
Contributor III

A detailed look reveals a difference in the schematics: for the 2nd device, the VBAT is not connected, where device 1 it is connected to VDD.

Could this cause this and possibly other problems ?

Is there a software / runtime detection possible to mark this test as FAIL rather than ending up in a hardfault handler ?

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,512件の閲覧回数
bartrijvers
Contributor III

The EXTAL32 and XTAL32 pins were the first that we tested and these were oscillating at the desired frequency.

The exact chip name is MK26FN2M0CAC18R.

This morning we were able to patch three boards (connect VBat) and all these now passed the test.

I now get the concern about the NMI pin which should be connected to PTA4 pin. This pin is not connected in both our boards. I cannot judge the effects of this ?

0 件の賞賛
返信
1,512件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Bart Rijvers,

     If you can, you can try to add the pull up resistor to the NMI pin in your issue board.

    If you PCB layout can't add it, you can debug your issue board, add the NMI interrupt ISR code, and put a break point in it, then check, whether it can enter NMI ISR.

   Besides, you can also try to connect VBAT and test again in your issue board.

   Just to find the root problem.

  Any updated information, please let me know!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,512件の閲覧回数
bartrijvers
Contributor III

Both boards cannot be patched for the NMI pin.

I registered a NMI handler and saw it is never tripped during any of my test runs. To be safe, I disabled the external NMI interrupt in the Flash option register and added an internal pull-up on the PTA 4 pin.

The RM paragraph 49.4.1 is pretty clear on the matter:

rtc_rm_hardfault.gif

0 件の賞賛
返信
1,513件の閲覧回数
bartrijvers
Contributor III

A detailed look reveals a difference in the schematics: for the 2nd device, the VBAT is not connected, where device 1 it is connected to VDD.

Could this cause this and possibly other problems ?

Is there a software / runtime detection possible to mark this test as FAIL rather than ending up in a hardfault handler ?

0 件の賞賛
返信
1,512件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Bart Rijvers,

   I don't think it is related to the VBAT pin.

  1. Please check the EXTAL32 and XTAL32 pin, whether the crystal is oscillating?

  2. Check NMI pin, whether you add external 4.7K to 10K pull up resistor?

  3. Tell me the full name of your chip. You also can post some debug register information of RTC and SIM register.

  Please check these points at first.

  Any updated information, please let me know!

Best Regards,


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信