NRF52: NFC support?

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
User avatar
marfis
Posts: 215
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

NRF52: NFC support?

Post by marfis » Fri Nov 16, 2018 3:51 pm

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.

c45713
Posts: 51
Joined: Fri Dec 09, 2016 7:09 pm

Re: NRF52: NFC support?

Post by c45713 » Wed Jan 02, 2019 9:56 pm

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.

User avatar
marfis
Posts: 215
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: NRF52: NFC support?

Post by marfis » Thu Jan 03, 2019 2:35 am

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!

rena2019
Posts: 8
Joined: Sun Sep 29, 2019 3:00 pm

Re: NRF52: NFC support?

Post by rena2019 » Tue Apr 20, 2021 8:32 am

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 https://github.com/glennrub/micropython/tree/nrf52_nfc "Add basic support for NFC tag 2"
https://github.com/glennrub/micropython ... 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/mkrules.mk:77: build-pca10040/modules/machine/nfc.o] Error 1

Post Reply