[FRDM-KW38] Not able to run Heart Rate Sensor (Bare Metal) example from MCUXpresso SDK

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

[FRDM-KW38] Not able to run Heart Rate Sensor (Bare Metal) example from MCUXpresso SDK

Jump to solution
1,519 Views
rahme
Contributor II

Hello everyone,

I have a the FRDM-KW38 development board. I tried to flash the HRS example from the MCUXpresso SDK to play with BLE. In source/app_preinclude.h, I disabled the PowerDown feature:

 

/* Enable/Disable PowerDown functionality in PwrLib */
#define cPWR_UsePowerDownMode           0

 

Stepping into the program shows a raised Hard Fault exception when trying to access FREESCALE_PROD_DATA memory region:

Screenshot from 2021-09-06 15-24-19.png

Below is my current memory mapping:

Screenshot from 2021-09-06 15-31-51.png

Someone ran into the same problem here but for the mkw36 development board: https://community.nxp.com/t5/Wireless-Connectivity/Hardfault-when-using-eeprom-in-KW36-BLE-demo/m-p/...

However I can't understand the solution as I don't have any prior experience with MCUs ='( I need a step-by-step guide to get this example up and running.

I'm a GNU/Linux user, I have installed MCUXpresso IDE along with the SDK (2.6.11) I connected the board using USB and followed instruction at https://www.nxp.com/document/guide/getting-started-with-the-frdm-kw38:GS-FRDM-KW38

Many thanks!

0 Kudos
1 Solution
1,498 Views
nxf56274
NXP Employee
NXP Employee

Hi,

1 Do you modify any other code except the 'cPWR_UsePowerDownMode' ?

2 Does this happen in the other example?

3 Use GUI flash to do Mass erase.  

1111.png

kqa.PNG

 

Have a great day,
TIC

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

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
1,499 Views
nxf56274
NXP Employee
NXP Employee

Hi,

1 Do you modify any other code except the 'cPWR_UsePowerDownMode' ?

2 Does this happen in the other example?

3 Use GUI flash to do Mass erase.  

1111.png

kqa.PNG

 

Have a great day,
TIC

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

- We are following threads for 7 days after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,490 Views
rahme
Contributor II

Hi,

Thank you for your answer, and I appologize for my later response.

1 Do you modify any other code except the 'cPWR_UsePowerDownMode' ?

No.

2 Does this happen in the other example?

Yes. My focus is in BLE examples. So, I tested Beacon and peripheral with extended advertising. All with the same issue.

3 Use GUI flash to do Mass erase.

So sweet =O  It solved my problem many thanks. I didn't have the same option as you on my IDE (v11.4.0) both on Windows and GNU/Linux. So I did erase all flash banks (see capture below) and it worked after flashing the HRS example from the SDK (without any edit). Holding the SW3 made my board starts advertising.

Capture.PNG

Currently, I m trying to study the power management on this chip as my software is targeted for automative use. So, I need to write a piece of software that exploits BLE with the minimum power consumption possible (How to enter deep sleep mode/exit from deep sleep, types of wakeup sources and how to configure them)

As I said before, I don't have any experience with NXP MCUs. Thus, I don't know where to start. If you can point me to the right direction it will be very helpful (resources, courses, etc).

I marked you answer as a solution. Many thanks.

0 Kudos
1,471 Views
nxf56274
NXP Employee
NXP Employee

You need download the kw36 sdk. There are some useful document in 'docs\wireless\Bluetooth'. You can start with 'Bluetooth Low Energy Demo Applications User Guide.pdf'. This tell you how to run the example. 

'Bluetooth Low Energy Application Developer Guide.pdf' tells you how to develop the program.

0 Kudos
1,457 Views
rahme
Contributor II

Hi,

I downloaded the documents. Again, many thanks.

Have a nice day.