I have been a bit busy recently, and I haven't played with 52840, so I haven't posted for a long time. Open the nRF5_SDK_15.2.0_9412b96\examples\nfc\nfc_uart\tag file in the nordic SDK package, and view the compiled source code through the segger IDE tool of mdk or nrf. See the source code below:
The nrf program is very interesting. It integrates the judgment and waiting with other functions, which will be easier to read, but it is more difficult to write this program. It is easy to make mistakes in the order and cause problems in the program. In addition, his functions are always encapsulated and encapsulated again. The same function may have several names. 1,2 is to set up NFC, that is, to initialize the NFC function, but these two functions do not exist in the source code under the SDK, resulting in no data in the NFC read, which is what wasted many days for me. The code at 3 is to read the data of the NFC block and store it in an address. The function is an encapsulation of get. From the parameters, it points to the receiving area of NFC.
At 4, fifo_put is simply encapsulated to point to uart. It can be understood that the result is a serial port output function. 5, 6 are the reverse outputs of 3, 4, read from uart, and output NFC
Is this code similar to the above? Insert the 52840 NFC coil and read it with pn532. Since the initialization is not successful (I think so), the NFC blocks read out are all 0. In addition, the tag process cannot be written with 532, it can only be read. The data can only be configured in the program and read through NFC.
Well, thank you for sharing! It's great to be able to share! Keep it up! Looking forward to your masterpiece! If you have any questions, we can discuss them together!
Details
Published on 2019-1-7 13:51
Well, thank you for sharing! It's great to be able to share! Keep it up! Looking forward to your masterpiece! If you have any questions, we can discuss them together!