Cannot get examples to work

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Cannot get examples to work

跳至解决方案
805 次查看
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 解答
682 次查看
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 回复数
776 次查看
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 项奖励
回复
730 次查看
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 项奖励
回复
683 次查看
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 项奖励
回复