Cannot get examples to work

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

Cannot get examples to work

ソリューションへジャンプ
785件の閲覧回数
ArkAndyFraser
Contributor III

I am struggling to get any code to run on my S32K144W.

I have selected New Project from Example and chose the lpuart for the 144W. When I build and debug the code I get the following:

BusFault: A precise (synchronous) data access error has occurred.
Possible BusFault location: 0x4004B020.
HardFault: A fault has been escalated to a hard fault.

This happens with a call to:

PINS_DRV_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);

Does anyone know what I am doing wrong?

Andy

0 件の賞賛
1 解決策
662件の閲覧回数
ArkAndyFraser
Contributor III

Okay, false alarm !

I found that a contact on my external crystal was not correctly soldered.

Now I have both the timer and uart examples working.

@VaneB Thanks for your help - much appreciated.

Andy

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
756件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @ArkAndyFraser 

Did you make any modifications to the example code? According to the address 0x4004B020, the problem looks like it is in the Pin Control Register of the PORT C. 

VaneB_0-1693608222132.png

Please check the exact instructions that caused the BusFault. It can be debugged as explained in this document/example: Fault handling on S32K14x.

 

B.R.

VaneB

0 件の賞賛
710件の閲覧回数
ArkAndyFraser
Contributor III

@VaneB

It is completely unmodified - I chose choose new project from example, built the project and then hit debug. It fails here:

void PINS_Init(const pin_settings_config_t * config)
{
DEV_ASSERT(config->base != NULL);
DEV_ASSERT((PORT_MUX_AS_GPIO != config->mux) || (config->gpioBase != NULL));
DEV_ASSERT(config->pinPortIdx < PORT_PCR_COUNT);
uint32_t regValue = config->base->PCR[config->pinPortIdx];  <----------------------------------
uint32_t directions;
uint32_t digitalFilters;
port_mux_t muxing;

ArkAndyFraser_0-1693643325362.png

Thanks for your help.

Andy

 

0 件の賞賛
663件の閲覧回数
ArkAndyFraser
Contributor III

Okay, false alarm !

I found that a contact on my external crystal was not correctly soldered.

Now I have both the timer and uart examples working.

@VaneB Thanks for your help - much appreciated.

Andy

0 件の賞賛