NTM88 saving last pressure value in flash memory before going to stop1 mode and reading it back

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

NTM88 saving last pressure value in flash memory before going to stop1 mode and reading it back

Jump to solution
765 Views
ankit2631
Contributor II

My application is TPMS and i want to save the last pressure value in a flash memory before going in stop1 mode and want to read it when comes out of the stop1 mode. i wanted to know which function can i use and what is the range valid memory locations in which i can write this value. 

0 Kudos
1 Solution
705 Views
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

Once again, thank you for using the NXP communities.

Please review the response from one of our specialist below:

 

Reading flash memory can be done directly by the application, there is no need for a library function.

For example, below instructions read address 0xE000:

                      add = 0xE000;

                     u8Read = *((UINT8*)(add));

 

To store a few bytes of data from one wake up to another, it is recommended to use the parameter register section of the NTM88. This section is similar to RAM but maintained in STOP1. It is 64-byte long. If more than 64 bytes need to be stored then writing in flash can then be used.

In the GenFSK Beacons project, gau8WDIV array is stored in the parameter registers, so the value is maintained in STOP1:

 

diazmarin09_0-1681326958693.png

 

More information can be found in the user manual and in the document “NTM88_RAM_and_FLASH_Organization” that can be found in the folder documentation > doc_ntm88 of the Starter Package.

I hope this information helps.

Regards,

David    

View solution in original post

0 Kudos
3 Replies
756 Views
diazmarin09
NXP TechSupport
NXP TechSupport

Hello Ankit,

I hope all is great with you. Thank you for using the NXP communities.

Have you considered using the TPMS_READ or TPMS_E_READ functions?

When the functions TPMS_READ or TPMS_E_READ are executed to read raw pressure or acceleration measurement, the sequence detailed in Figure 6 is executed.

diazmarin09_0-1680815499739.png

 

Please review the file attached this response. I do recommend using it as a reference for your design.      

I hope this information helps.

Regards,

David    

0 Kudos
726 Views
ankit2631
Contributor II

The process that you shared is for reading the measured values like pressure ,temp ,Accel and voltage, right? i will explain my application. 

I am using the example code NTM88_GenFSK_Beacons. In this code the device is going into stop1 mode after reading the values. I want to wake up the BLE master if there is change in pressure value at the rate of 2 Psi or more than that. so in order to achieve this, i was thinking that i could use a segment of a flash memory where i could write the last pressure values before going into stop1 mode and read it back to compare it with my current pressure values.I am wondering if this is possible with NTM88 because in ntm88_axis_xz_lib.h i found the functions TPMS_FLASH_WRITE ,TPMS_FLASH_ERASE but i am not able to find any function to read the flash memory data.

0 Kudos
706 Views
diazmarin09
NXP TechSupport
NXP TechSupport

Hello,

Once again, thank you for using the NXP communities.

Please review the response from one of our specialist below:

 

Reading flash memory can be done directly by the application, there is no need for a library function.

For example, below instructions read address 0xE000:

                      add = 0xE000;

                     u8Read = *((UINT8*)(add));

 

To store a few bytes of data from one wake up to another, it is recommended to use the parameter register section of the NTM88. This section is similar to RAM but maintained in STOP1. It is 64-byte long. If more than 64 bytes need to be stored then writing in flash can then be used.

In the GenFSK Beacons project, gau8WDIV array is stored in the parameter registers, so the value is maintained in STOP1:

 

diazmarin09_0-1681326958693.png

 

More information can be found in the user manual and in the document “NTM88_RAM_and_FLASH_Organization” that can be found in the folder documentation > doc_ntm88 of the Starter Package.

I hope this information helps.

Regards,

David    

0 Kudos