JN5168 PDM on external flash memory

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

JN5168 PDM on external flash memory

967 Views
akila123456
Contributor I

Hi,

I try to compile ZigbeeNodeControlBridge with :

PDM_BUILD_TYPE  ?= _EXTERNAL_FLASH

But I have an error :

cannot find -lPDM_EXTERNAL_FLASH_NO_RTOS_JN516x

Indeed, in JN-SW-4170 stack, there is only libPDM_EEPROM_NO_RTOS_JN516x.a

Where is my mistake ? How can I obtain libPDM_EXTERNAL_FLASH_NO_RTOS_JN516x.a ?

Can someone give me a tip please?

Thanks

Labels (1)
0 Kudos
7 Replies

800 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Fred,

Please look at the 3. Persistent Data Manager (PDM) for Flash Memory https://www.nxp.com/docs/en/user-guide/JN-UG-3075.pdf 

You can take as reference the PDM implementation on the Zigbee Smart Energy.

Regards,

Mario

0 Kudos

800 Views
the_banda
Contributor I

I am battling with same problem and I have read through that document, but couldn't find anything helpful for building binaries. If I understood correctly JN-AN-1135 (the Zigbee Smart Energy) does not use JN-SW-4170 stack.

Aren't we supposed to use _EXTERNAL_FLASH? Do you have any external flash examples for JN-SW-4170 stack?

0 Kudos

800 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Vesa,

Please look at the JN-AN-1218. We provide OTA Cluster that supports an internal or external flash, depending on the define.

Regards,

Mario

0 Kudos

800 Views
the_banda
Contributor I

Yes, I already knew that JN-AN-1218 has example for that. Since I am not interested using external flash for OTA that example doesn't help me forward. After your reply I went through documentation and code from JN-AN-1218 again and it doesn't help with problem that I and original poster are having. We would like to use external flash for PDM instead of using EEPROM.

I think that using build flag PDM_BUILD_TYPE  ?= _EXTERNAL_FLASH would change how JN5168 handles PDM. I know that I would still need to tell it what kind of flash chip I have. If using custom flash chip it is also required to configure it using PDM_vSPIFlashConfig(), but if chip is already supported by stack then I can just call PDM_vInit(). This information is from JN-UG-3075 chapter 3. Persistent Data Manager (PDM) for Flash Memory. More information about those functions can be found from same documents chapter 9. PDM API for Flash Memory. Does this sound correct or am I completely wrong?

Do you have example for this? Or is it even possible to use external flash for pdm?

0 Kudos

800 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Vesa,

Our examples provide the PDM to use the internal flash. ZB3, ZHA, ZLL.

But you could look at the JN516x ZigBee Smart Energy SDK (JN-SW-4064) that handles the storage of stack context and application data in Flash memory which is external to the JN516x device. 

Note: the Zigbee Smart Energy is not supported, so look at the SDK and take as reference the implementation.

3. Persistent Data Manager (PDM) for Flash Memory

https://www.nxp.com/docs/en/user-guide/JN-UG-3075.pdf 

Regards,

Mario

0 Kudos

800 Views
akila123456
Contributor I

Hi,

the main problem for me that there are no library with external flash management

If I use libPDM_EXTERNAL_FLASH_JN516x.a from JN-SW-4064 sdk with JN-SW-4170 sdk, the reference is not good :

ccRf2G2B.ltrans13.o:(.text+0x119): undefined reference to `PDM_vInit'
ccRf2G2B.ltrans13.o:(.text+0x119): relocation truncated to fit: R_BA_18_PCREL against undefined symbol `PDM_vInit'

I don't understand if it's possible to generate a library which contain the right address to the function or if this must be generate and distribute by NXP...

I searched but I don't see the PDM_vInit source function too ...

Could you explain how to obtain the right library with right function for external flash management ?

Regards,

Fred

0 Kudos

800 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Fred,

This lib is for the SE that is no longer supported, you could look at for your reference, but the PDM implementation in an external memory should be by your side.

You could follow the PDM process that we shoe in figure 5. 

Initializing the PDM function. 3.2 Initialising the PDM

Regards,

Mario

0 Kudos