Most likely you are right, nevertheless, all my simple devices are working correctly, the only problem that I have encountered is a problem when flashing some controllers through the USBASP.
This is version 2 of a Simple compact RS485 node with support FOTA
You can order PCB from PCBs.io - 4pcs for $4.65, black 1.6mm PCB
D7 pin used for control RS485 DE/RE input.
A2 pin used as CS pin of flash Winbond W25X40.
On long side of board present 11-pin header include:
On short side of board present two pin header include:
On bottom side of board present MISO, MOSI, and SCK for programming bootloader to ATmega328.
Present place to solder crystal oscillator, if you need stability of UART working on high speed.
Present place to solder pull-up resistors for RES, D2, D3, SDA, SCL signals.
It is also possible to install LED connected between D6 pin and 5V through 510Ohm resistor.
!!! Attention !!!
You must use 3.3V to power the node because of not need locic level shifting when connect flash W25X40
(i used MAX3485 and LDO LP2950ACZ-30 to power from 12V)
For FOTA used custom DualOptiBoot with A2 pin for CS of flash builded from source for ATmega328P, 8Mhz, 38400 UART speed for upload).
Fuse setting for DualOptiboot:
For test you can use TestNode_RS485_OTA
!!! Attention !!!
For correct work of FOTA with flash chip Winbond W25X40CLSNIG you need to use patched lib SPIFlash.h
Here is the correction of code:
#ifndef SPIFLASH_BLOCKERASE_32K
//#define SPIFLASH_BLOCKERASE_32K 0x52 //!< erase one 32K block of flash memory
#define SPIFLASH_BLOCKERASE_32K 0xD8 // need same as 64K
#endif
#ifndef SPIFLASH_BLOCKERASE_64K
#define SPIFLASH_BLOCKERASE_64K 0xD8 //!< erase one 64K block of flash memory
#endif
Place to solder crystal oscillator: