ModBUS and PN532 libraries via hardware serial ports on STM32F446RET6
Posted: Wed Mar 12, 2025 8:21 am
I've been programming my projects with Atmel and ESP8266/ESP32 for a while now. I've purchased a WeAct Studio module with an STM32F446RET6. I use Visual Studio Code with PlatformIO and the Arduino framework for programming. I've tried all the UART/USARTs and I've been able to read the signals on the serial monitor using a TTL-USB converter.
However, if I use the emelianov's ModBUS library v4.1.1 or the Seeed-Studio PN532 library through the serial ports, both don't work. When I connect the TTL-ModBUS RTU converter, I get no response. When I connect the PN532 NFC module, it detects it, reads the firmware version, but doesn't go past line 182 of the PN532.cpp file:
Is the same thing happening to you?
However, if I use the emelianov's ModBUS library v4.1.1 or the Seeed-Studio PN532 library through the serial ports, both don't work. When I connect the TTL-ModBUS RTU converter, I get no response. When I connect the PN532 NFC module, it detects it, reads the firmware version, but doesn't go past line 182 of the PN532.cpp file:
Code: Select all
if (HAL(writeCommand)(pn532_packetbuffer, 3)) {
return 0x0; // command failed
}