mkw36 program flash issue

cancel
Showing results for 
Search instead for 
Did you mean: 

mkw36 program flash issue

166 Views
Contributor III

Hello NXP community,

I am facing some problem, in our project, with the Program flash of the mkw36 microcontroller which is supposed to be 512Ko. However when the program exeeds 50% of the 512ko flash it craches and we are not able do proceed with debug neither to flash it with JLink. To confirm this issue, I moved to the otap example from the SDK and  I declared a big constant buffer so the m_text would bypass the PFlash section. Trying to debug the program, I am facing the same proble. Here after is the result after compilation :

Memory region         Used Size  Region Size  %age Used
    m_interrupts:         192 B        192 B    100.00%
BootFlags_region:          32 B         32 B    100.00%
  m_flash_config:          16 B         16 B    100.00%
          m_text:      292512 B     505616 B     57.85%
 InternalStorage:          0 GB         0 GB      -nan%
      NVM_region:          8 KB         8 KB    100.00%
        m_data_2:        2240 B        16 KB     13.67%
          m_data:       32828 B        48 KB     66.79%
Finished building target: frdmkw36_wireless_examples_bluetooth_otac_att_freertos.axf

Knowing that I am using the SDK version 2.0.0 (issue also appears when using SDK 2.1.0). Can you please help me with this problem.

Best regards,

Souhail

Labels (1)
4 Replies

4 Views
Contributor III

Hello Sebastian,

Thank you for your response it is very helpfull, in fact the "unlock kinetis" resolves the issue, I think that when the mcu comes from factory by default the Dflash cannot be used as a Pflash only after executing "unlock kinetis".

Best regards,

Souhaik

4 Views
NXP TechSupport
NXP TechSupport

Hello,

By any chance are you considering the bootloader space for the OTA functionality? It depends if you are using either external o internal functionality

You can check the following diagram, if you are using the internal storage half the space is reserved for the application and half for the OTAP internal storage , that might be what you are seeing. 

pastedImage_1.png

You can check more information about this in the chapter 11.8 OTAP bootloader of the Bluetooth Low Energy Application Developer's Guide, this document is available in the MCU SDK in the following path:

<installation path>\docs\wireless\Bluetooth

Regards,

Estephania

0 Kudos

4 Views
Contributor III

Hello Estephania,

Thank you for your response, the issue is not related to the otap since I am using an external memory flash and I am using already the  otap. However, even using any other example from the sdk (like the ota server which does not require a bootloader with it), add a constant buffer so the m_text will exceed the 256ko, you will see that you are not abke any more to debug neither to flah the mcu. I hope I was clear.

Best regards, 

Souhail

0 Kudos

4 Views
NXP TechSupport
NXP TechSupport

Hi Haggui, I hope you're doing well!

 

If you're adding a buffer to tor memory map, the space left for the BLE stack might not be enough, and that could cause problems.

 

Could you please show me how your memory map is configured?

Are you changing anything in it? For example, this is the default memory configuration for the BLE OTA Client SDK example:

 pastedImage_4.png

Also, could you please try performing an "unlock kinetis" command from J-link commander and programming your device again?

 

Please let me know of your findings.

 

Best regards,

Sebastian