Open paweljasinski opened 8 months ago
hi,paweljasinski: Speed value must be one of these constants: 9600 (default), 19200, 38400, 57600, 115200, 230400 or 460800.", uiPortSpeed); It's in the file “uart.c”. But 115200 is the PN532's default value. If you want to use other baud, you must use "SetSerialBaudRate" command first.
To be sure I am not misunderstanding anything.
Please refer to the diagram: To be sure that the baud rate-"Real HSU Freq" error is not greater than 4%:
already have a basic communication with 230.4.
To be sure that the baud rate-"Real HSU Freq" error is not greater than 4%: Do I have to adjust registers value (HSU_CNT and HSU_PRE) myself, or it happens as part of SetSerialBaudRate?
I have another question: Once the comm speed is changed from default, it is persistent until reset or power cycle. For now I am coding with assumption that libnfc works with the board after reset and starts with 115200 and changes to requested speed. The code is not trying to reestablished communication after program terminated but board did not get reset and is still using the altered speed. Is this something you would considered to be acceptable in PR?
Poll the command "SAMConfiguration" at different baud rates before communication, such as: 55 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 03 FD D4 14 01 17 00, and receive the right ACK.
Are serial speeds other than 115200 supported when using pn532? Both:
device.connstring = "pn532_uart:/dev/ttyUSB0:57600
anddevice.connstring = "pn532_uart:/dev/ttyUSB0:460800
produce a code dump.