Cannot get examples to work

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

Cannot get examples to work

Jump to solution
798 Views
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 Kudos
1 Solution
675 Views
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

View solution in original post

0 Kudos
3 Replies
769 Views
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 Kudos
723 Views
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 Kudos
676 Views
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 Kudos