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

Unreliable NFC builds for nRF52 SDK 12.3

Hi,

I've been struggling with a problem with my builds for over a year now.

On some builds NFC works perfectly, but on many it doesn't - and I have no idea why. I can change some completely unrelated code. rebuild, and suddenly NFC will work - so I assume it is some kind of alignment issue. As I target more nRF52 based devices it becomes increasingly impossible to find a way of making a firmware release where all the devices have working NFC!

I'm using GCC 8 with HAL_NFC_ENGINEERING_BC_FTPAN_WORKAROUND=1 and -flto (but every GCC version I've tried has had the issue). Without flto fixes it I believe but that's not an option as I need link time optimisation to get the binary size down.

When NFC isn't working I just get loads of HAL_NFC_EVENT_FIELD_OFF events when a reader is near, whereas in working builds I get pretty much matching amounts of HAL_NFC_EVENT_FIELD_OFF and HAL_NFC_EVENT_FIELD_ON.

Do you have any ideas of ways to track this down? Or have issues been sorted in later SDKs that weren't backported to SDK12.3? Looking at 15.3 it seems the NFC library has been refactored and the hal layer that I was using (in an attempt to get a more reliable build) has now been completely removed. Could it be at all related?

My NFC instantiation and code is here: https://github.com/espruino/Espruino/blob/master/targets/nrf5x/bluetooth.c#L2688

- Gordon

Parents Reply Children
No Data
Related