This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can you use nfc T4T and T2T libraries in same application/build?

Can you use/link both nfc T4T and T2T libraries and wrapper/driver source in same application/build?

I don't mean emulating both modes at the same time.

Thanks.

Parents
  • Hi

    I think these libraries use the same IRQHandler, so I'm guessing trying to add both into one project might cause some "multiple definitions" errors, but as other than that, I can't think of why it should be a problem to have T4T and T2T in the same project. Please note that you might have to make some changes to the existing code in order to ensure that they use different handlers. The handler seems to be located in nrfx_nfct.c and it calls a callback set in nrfx_nfct_init().

    Best regards,

    Simon

  • Thanks. I guess I'll try it and update the ticket with the results.

    As far as I could tell from inspection the nrfx_nfct_init() isn't called from the src so it is probably called in the  library nfc_t4/2t_emulation_start(), which if true is good.

  • I tried it.

    There were no link errors or warnings. I'm using IAR tools. I didn't make any SDK17 t2t or t4t  related source changes. I didn't see anything in nrfx_nfct.c that needed changing.

    The bad news is that the NFC functionality only works once. In other words you can start t2t or t4t and they work normally, but once you stop nfc neither mode will restart. 
    This is true even if only one mode is ever used. Seems like the problem may be with  _stop() and/or _done(), but it is odd that one mode doesn't still work if the other mode is never used.
    @@@@@@ Case 1 only T4 mode from RESET @@@@@@
    nfc_t4t_setup() OK
    nfc_t4t_parameter_set() OK
    nfc_t4t_emulation_start() OK
    <t4t functionality is working OK here >
    nfc_t4t_emulation_stop() OK
    nfc_t4t_done()  OK
    <reader no longer detects device>
    =======================
    //2nd attempted use
    nfc_t4t_setup() FAILS code 8
    @@@@@@ Case 2 only T2 mode from RESET @@@@@@
    nfc_t2t_setup() OK
    nfc_t2t_payload_set() OK  
    nfc_t2t_emulation_start() OK
    <t2t functionality is working normally here>
    nfc_t2t_emulation_stop() OK
    nfc_t2t_done()  OK
    (also receive NFC_T2T_EVENT_STOPPED)
    <reader no longer detects device> 
     
    //2nd attempted use
    nfc_t2t_setup() FAILS code 8
Reply
  • I tried it.

    There were no link errors or warnings. I'm using IAR tools. I didn't make any SDK17 t2t or t4t  related source changes. I didn't see anything in nrfx_nfct.c that needed changing.

    The bad news is that the NFC functionality only works once. In other words you can start t2t or t4t and they work normally, but once you stop nfc neither mode will restart. 
    This is true even if only one mode is ever used. Seems like the problem may be with  _stop() and/or _done(), but it is odd that one mode doesn't still work if the other mode is never used.
    @@@@@@ Case 1 only T4 mode from RESET @@@@@@
    nfc_t4t_setup() OK
    nfc_t4t_parameter_set() OK
    nfc_t4t_emulation_start() OK
    <t4t functionality is working OK here >
    nfc_t4t_emulation_stop() OK
    nfc_t4t_done()  OK
    <reader no longer detects device>
    =======================
    //2nd attempted use
    nfc_t4t_setup() FAILS code 8
    @@@@@@ Case 2 only T2 mode from RESET @@@@@@
    nfc_t2t_setup() OK
    nfc_t2t_payload_set() OK  
    nfc_t2t_emulation_start() OK
    <t2t functionality is working normally here>
    nfc_t2t_emulation_stop() OK
    nfc_t2t_done()  OK
    (also receive NFC_T2T_EVENT_STOPPED)
    <reader no longer detects device> 
     
    //2nd attempted use
    nfc_t2t_setup() FAILS code 8
Children
No Data
Related