FRDM-KW41Z hybrid Thread router wireless uart example does not run

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

FRDM-KW41Z hybrid Thread router wireless uart example does not run

Jump to solution
984 Views
mathman164
Contributor I

I am following the Hybrid (BLE + Thread) tutorial from the FRDM-KW41Z webpage.  I'm using MCUXpresso v10.1.1 and SDK_2.x_FRDM-KW41Z v2.2.0.  I have followed the directions for importing an SDK example project (as much as possible, the project import screens look a little different than in the video).  The project builds with no issues.  I downloaded the application using the Debug link in the Quickstart Panel and when complete I'm at main.  However, when I tell the debugger to let the application run I always end up immediately in the hardfault handler.

After some debug stepping I've found that the variable memHeap declared in MemManager.c line 78 was not explicitly word aligned.  This is a problem since one of the first uses of this general variable is to allocate space for a linked list and set pointer to each element in the list.  

I changed the line from:

uint8_t memHeap[heapSize_c];

to:

uint8_t memHeap[heapSize_c] __attribute__((aligned(4)));

This got the application running as expected.  The LEDs flash and the serial port responds to commands.  However, the NXP IoT Toolbox application does not seem to be able to find the device.  If I scan for Bluetooth devices with just the standard Android Bluetooth menu I see a device named NXP_THR, but if I select I receive a message that says pairing was rejected.  I using a Nexus 5x with Android 8.1 and NXP IoT Toolbox v5.0.2.

Any incite as to why this doesn't work would be appreciated

0 Kudos
1 Solution
672 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

I checked the latest release and I was not able to find the line you changed. You might have an older version of the SDK and it seems that the name has kept the same.

Could you please try to download it again and check if you still have the issue? 


Best Regards, 

Estephania 

View solution in original post

0 Kudos
2 Replies
673 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

I checked the latest release and I was not able to find the line you changed. You might have an older version of the SDK and it seems that the name has kept the same.

Could you please try to download it again and check if you still have the issue? 


Best Regards, 

Estephania 

0 Kudos
672 Views
mathman164
Contributor I

Thanks for the reply.  I built a new SDK for the KW41Z using the SDK builder and verified that the code I changed had already been replaced.  The application builds and runs as expected.  However, please note that my original SDK with the issue is still available on the FRDM-KW41Z page, Getting Started tab, Getting Software tab, Get MCUXpresso SDK link.

As for the NXP IoT Toolbox not finding the device.  That appears to be a problem with my phone and Bluetooth LE.  I was able to successfully connect and run the demo with another phone.

Thanks for the help,

Andrew

0 Kudos