Hi,
I would suggest you to read the principle of AN4258. It is short and easy to understand.
The handshake is solved by XON and XOFF protocol bit for dynamic data flow. There is a buffer in the MCU which is filled directly from PC and when it is full the XOFF is send from MCU to the PC to stop data flow. Then the MCU flashes the data. After they are flashed (buffer is empty) the XON is send from the MCU to the PC and data flows continues.
The AN4258 works: PC(UART) <---- XON/XOFF driven Handshake ----> MCU(UART)
The solutions you can use:
1) PC(UART)<->MCU_MASTER(UART/CAN) <-> MCU(CAN)
2) PC(CAN)<->MCU(CAN)
In both cases you can perform some dynamic handshake with filling and processing a buffer on MCU side or you can use static handshake when you send an exact and appropriate number of bytes to the MCU and wait (PC) for confirmation of data processing (MCU) to be able to send next data set.
The second option is, of course, better but you need some PC CAN interface and SW to control handshake.
So, finally if you exclude entire UART communication from AN4258 you can implement any data flow between your Master device and MCU via CAN.
Best regards,
Ladislav