Running a modified version of NFC08A1 AP2P demo from RFAL examples -- not quite working correctly
Hello,
I am working on a version of the STM32L476RG_NUCLEO_AP2P_PROP_NFC8 demo included with the RFAL library examples, trying to get it going on a NUCLEO-F072RB.
I have my code running, and if I bring an L476RG flashed with the unmodified AP2P demo, the boards will transact, but the F0 board is always the initiator. Previously, when using two L476RG boards and the original demo, they would change which was the initiator and target depending on the timing they were brought in proximity.
I've been debugging thoroughly, but I can't quite narrow down what my issue could be. rfalNfcWorker() seems to be setting gNfc.state to the correct states: RFAL_NFC_STATE_POLL_TECHDETECT, RFAL_NFC_STATE_LISTEN_TECHDETECT, etc. I've noticed when stepping through, though, that it never leaves RFAL_NFC_STATE_POLL_TECHDETECT, but if I set a breakpoint at the different cases in rfalNfcWorker() it will cycle through them during discovery.
My big issue: when I program two F0 boards with my modified version, I cannot get them to detect each other. It is almost like they are only looking for a listen target and never leave that state.
The way I cobbled this together is by starting a new project using the X-NFC-6 middleware, got pins and peripherals configured, then ported over the demoIni(), demoCycle(), etc, functions over right into main.c (just for the first steps in getting a working demo). I've attached it, if this is helpful.
Any pointers on where to look? I've spent hours stepping through both my F0 version and the original AP2P demo for the L476RG, and I can't seem to see a different during run time.
