Page 1 of 1

NRF52: NFC support?

Posted: Fri Nov 16, 2018 3:51 pm
by marfis
I wonder if there is some work being done on the NFC support for the nRF52. Other users seems to have asked the same questions so I thought I open a separate topic.

I'm willing to join or help on this issue but need some pointers within the nRF SDK on where / how a possible integration could be done.

Re: NRF52: NFC support?

Posted: Wed Jan 02, 2019 9:56 pm
by c45713
I'm not aware of any other activity on this either. If you would like to just lift some ideas or discuss the topic with someone, i'm present on IRC and might be able to help you out a bit. Same nick as in this forum.

Re: NRF52: NFC support?

Posted: Thu Jan 03, 2019 2:35 am
by marfis
thanks for the reply.

What if have figured out so far is that nordic has updated their nrfx lib with nfc support. And with some minor mods i was able to compile it with micropython (static assert macros must be defined).

Where I‘m stuck at the moment is how to use the different nrfx nfc functions - there are no examples shown. In the mdk they still show the „old“ way without nrfx, using a binary lib that is linked. I definetly dont want to go that way.

My current wip is that the callback of SENSE is working but no other functions. I guess I could have further dig in the state diagram shown on their online doc but I‘ve found that a bit confusing.

So if you have further infos about how to use the nrfx driver that would be great!

Re: NRF52: NFC support?

Posted: Tue Apr 20, 2021 8:32 am
by rena2019
Is someone out there who had success with building micropython for nRF52840 with NFC support?
I tried to build the 1.5 years old branch "Add basic support for NFC tag 2" ... 5f578ee942
without luck. Seems that that the external lib nrfxlib changed and it's not possible to build it anymore .....or I dont't know how to get the old version from github

make fails with:

In file included from modules/machine/nfc.c:25:0:
modules/machine/nfc.c:129:19: error: 'MP_QSTR_payload_raw_set' undeclared here (not in a function); did you mean 'nfc_t2t_payload_raw_set'?
{ MP_ROM_QSTR(MP_QSTR_payload_raw_set), MP_ROM_PTR(&mp_machine_nfc_payload_raw_set_obj) },
../../py/obj.h:96:56: note: in definition of macro 'MP_OBJ_NEW_QSTR'
#define MP_OBJ_NEW_QSTR(qst) ((mp_obj_t)((((mp_uint_t)(qst)) << 3) | 2))
modules/machine/nfc.c:129:7: note: in expansion of macro 'MP_ROM_QSTR'
{ MP_ROM_QSTR(MP_QSTR_payload_raw_set), MP_ROM_PTR(&mp_machine_nfc_payload_raw_set_obj) },
make: *** [../../py/ build-pca10040/modules/machine/nfc.o] Error 1