Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Use nfc_text_record in other examples

Hi, I'm working on a project based on the ble_uart_peripheral example. Now it can use NFC to wake up the MCU from SYSTEM OFF mode. I wanna add a new feature that when a smartphone touches the NFC, it can read something like a deviceID. So I tried to merge the nfc_text_record example to it.

I first add these files in the project panel  and include all different header files in the code. And then check the preprocessor include path and find that all the path are already included in the main project. Then I changed all the NFC related configurations in the sdk_config.h  , but got the following errors when building the project  (codes are same from the text-record examples)

      It doesn't look like a coding error. Am I missing any header files or configurations?

Thanks in advance.

Parents
  • Hi,

    Check that you added nrfx_nfct.c

    (Screenshot from the example found in sdk_folder\example\examples\ble_central_and_peripheral\experimental\ble_app_interactive)

    Also check and see if you have some missing User Include Directories.

    See this page: https://infocenter.nordicsemi.com/topic/ug_gsg_ses/UG/gsg/add_headers_ses.html

  • Hi,

    Thanks for pointing that out. I did miss the nrfx_nfct.c file. Looks like the previous errors are gone but now I got a new one when compiling nrfx_nfct.c the error leads to nrfx_timer.h  I remember I saw somewhere in an NFC example which says that timer4 should be left for NFC and that is the case in sdk_config.h of the NFC examples where only NRFX_TIMER4_ENABLED is set to 1 and others timers are 0. Any idea how to fix this one?

    Thanks again

    Another question about this error,  NRFX_TIMER1_INST_IDX is black and NRFX_TIMER4_INST_IDX is grayed out, does that mean the NRFX_CHECK() find NRFX_TIMER1_ENABLED = 1 and NRFX_TIMER4_ENABLED = 0 in the sdk_config.h? But what i have in the configuration is 

    // <e> NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver
    //==========================================================
    #ifndef NRFX_TIMER_ENABLED
    #define NRFX_TIMER_ENABLED 1
    #endif
    // <q> NRFX_TIMER0_ENABLED  - Enable TIMER0 instance
     
    
    #ifndef NRFX_TIMER0_ENABLED
    #define NRFX_TIMER0_ENABLED 0
    #endif
    
    // <q> NRFX_TIMER1_ENABLED  - Enable TIMER1 instance
     
    
    #ifndef NRFX_TIMER1_ENABLED
    #define NRFX_TIMER1_ENABLED 0
    #endif
    
    // <q> NRFX_TIMER2_ENABLED  - Enable TIMER2 instance
     
    
    #ifndef NRFX_TIMER2_ENABLED
    #define NRFX_TIMER2_ENABLED 0
    #endif
    
    // <q> NRFX_TIMER3_ENABLED  - Enable TIMER3 instance
     
    
    #ifndef NRFX_TIMER3_ENABLED
    #define NRFX_TIMER3_ENABLED 0
    #endif
    
    // <q> NRFX_TIMER4_ENABLED  - Enable TIMER4 instance
     
    
    #ifndef NRFX_TIMER4_ENABLED
    #define NRFX_TIMER4_ENABLED 1
    #endif

Reply
  • Hi,

    Thanks for pointing that out. I did miss the nrfx_nfct.c file. Looks like the previous errors are gone but now I got a new one when compiling nrfx_nfct.c the error leads to nrfx_timer.h  I remember I saw somewhere in an NFC example which says that timer4 should be left for NFC and that is the case in sdk_config.h of the NFC examples where only NRFX_TIMER4_ENABLED is set to 1 and others timers are 0. Any idea how to fix this one?

    Thanks again

    Another question about this error,  NRFX_TIMER1_INST_IDX is black and NRFX_TIMER4_INST_IDX is grayed out, does that mean the NRFX_CHECK() find NRFX_TIMER1_ENABLED = 1 and NRFX_TIMER4_ENABLED = 0 in the sdk_config.h? But what i have in the configuration is 

    // <e> NRFX_TIMER_ENABLED - nrfx_timer - TIMER periperal driver
    //==========================================================
    #ifndef NRFX_TIMER_ENABLED
    #define NRFX_TIMER_ENABLED 1
    #endif
    // <q> NRFX_TIMER0_ENABLED  - Enable TIMER0 instance
     
    
    #ifndef NRFX_TIMER0_ENABLED
    #define NRFX_TIMER0_ENABLED 0
    #endif
    
    // <q> NRFX_TIMER1_ENABLED  - Enable TIMER1 instance
     
    
    #ifndef NRFX_TIMER1_ENABLED
    #define NRFX_TIMER1_ENABLED 0
    #endif
    
    // <q> NRFX_TIMER2_ENABLED  - Enable TIMER2 instance
     
    
    #ifndef NRFX_TIMER2_ENABLED
    #define NRFX_TIMER2_ENABLED 0
    #endif
    
    // <q> NRFX_TIMER3_ENABLED  - Enable TIMER3 instance
     
    
    #ifndef NRFX_TIMER3_ENABLED
    #define NRFX_TIMER3_ENABLED 0
    #endif
    
    // <q> NRFX_TIMER4_ENABLED  - Enable TIMER4 instance
     
    
    #ifndef NRFX_TIMER4_ENABLED
    #define NRFX_TIMER4_ENABLED 1
    #endif

Children
No Data
Related