This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/RF430FRL152HEVM: Storing contents other than NDEF

Part Number: RF430FRL152HEVM
Other Parts Discussed in Thread: RF430FRL152H, TRF7970A

Tool/software: Code Composer Studio

Hi,

I used "RF430FRL152H_NFC_Only_Project_NDEF_Support" sample code and I could able to read with NFC reader from android app. But the sample providing NDEF message which is appearing in NDEF section of app. But I need data in memory content as shown in the image below, I got this by reading generic RFID/NFC tag.

From "sloa166a.pdf" I could able to understand NDEF protocol. "NFC_NDEF_Message" describes first byte 0xE1 is NDEF magic number which is making NDEF memory but to read as memory content what I need to change?

  • Hello Vijaya,

    If you use the NDEF format for Smartphones to read the tag, then you can store data within a Text Record or something along those lines. Or possibly use a MIME type as well. That's really an application specific concern you need to determine how best to address.

    In general, you can put your own data after the Capability Container and the File Type description. For example on SLOA166, if you look at Page 10 Figure 11, the URI Header Indicator is the last byte before the data starts. Note that you must include the TLV terminator (0xFE) after the end of your data as the NFC device checks this versus message length to verify it has reached the end of a valid NDEF file.

    For adding other types of NDEF messages you may find out Card Emulation for the TRF7970A app note and firmware a useful guide, but for full details you will need to acquire NFC Forum specifications. The app note for Card Emulation for TRF7970A is: www.ti.com/.../sloa208 - the firmware can be downloaded from it. The firmware has examples of different NDEF message types within the ndef_image.h file, and that may be helpful for you.
  • I don't want ndef format, inorder to store other format, what starting & ending sequences I can follow.
  • Hello Vijaya,

    If you don't want to use NDEF format then you need to develop your own Android app to read the data. Android won't support proprietary non-NDEF applications by default. It's possible to develop an app that doesn't follow NDEF, but that isn't provided by Android.

    Note that is not a TI limitation but an Android limitation.
  • OK,

    I am using NXP app that could able to read NDEF and non-NDEF data. In previous post I attached screenshot of app showing non-NDEF data read on general Tag.

    But RF430FRL152H example programs are only NDEF based samples. How can I store non-NDEF data(array shown in previous reply). When flashed program with above array is not coming in non-NDEF section of NXP Taginfo app.

  • Hello Vijaya,

    That is not true, only the project specifically titled as NDEF is for NDEF format. The other projects do not use NDEF formatting. The default project which is RF430FRL152H_Default_Project_With_Custom_Command does not use NDEF messaging.

    In that case you just need to define that the data is stored within the FRAM space for datalogging which is specified in the .cmd file of the project as the "FRAM" section. Using a pragma you can ensure your data is placed in that area and then it should be able to be read out by the Android app you are using.
  • Thank you, Ralph, I got it. Thank you for solving my problem.

    I need one more thing, the Memory addresses are configurable as the example below,

    FRAM :      origin = 0xF868, length = 0x0468  
    
    FRAM_CODE : origin = 0xFCD0, length = 0x0300

    and 

    GROUP(ALL_FRAM)
    {
    GROUP(READ_WRITE_MEMORY)
    {
    .TI.persistent : {} /* For #pragma persistent */
    .cio : {} /* C I/O buffer */
    .sysmem : {} /* Dynamic memory allocation area */
    }
    
    GROUP(READ_ONLY_MEMORY)
    {
    .cinit : {} /* Initialization tables */
    .pinit : {} /* C++ constructor tables */
    .init_array : {} /* C++ constructor tables */
    .mspabi.exidx : {} /* C++ constructor tables */
    .mspabi.extab : {} /* C++ constructor tables */
    .const : {} /* Constant data */
    }
    
    GROUP(EXECUTABLE_MEMORY)
    {
    .text : {} /* Code */
    }
    } > FRAM_CODE

     means some size data writing to FRAM_CODE. Can I move this code part to other area's like SRAM or ROM, so that I can get 0x0768 bytes of FRAM to read?

  • Hello Vijaya,

    I've said before, ROM is "Read Only Memory" - you cannot change it or add anything to it.

    SRAM is volatile, and data is lost on power cycle so the only way you could use SRAM is for data that your application code can recreate. If you are only using the ROM stack for the device, then you need very little FRAM application space only for patches for errata items in patch.c file of our web examples.

    You can also use the Memory Allocation feature in CCS to see how much space you are using and then allocate the remainder as needed. For example the default web example has 512 bytes of FRAM allocated for FRAM application code but only uses 152 bytes of it. So you can optimize your memory allocation that way.