I'm not completely certain of the flash programming and mass erase procedures for the MC9RS08KA2 MCU.
As far as I searched, a program should first be stored in RAM, through the BKGD pin, and then be executed with the GO command. This program would then execute the 'Flash Programming Procedure' or the 'Flash Mass Erase Operation', that are described on section 4.6.2 and 4.6.3 of the 'MC9RS08KA2 Datasheet', respectively.
If this is right, there is not enough RAM for programming an entire 64 byte array at a time on this MCU, since the RAM would need to contain some instructions to follow the procedure and the 64 bytes of a row to be actually programmed into the Flash EPROM. And the RS08KA2 has only 63bytes of RAM.
I'm wondering if I must use the RAM as a buffer, continuously storing new bytes that come trough the BKGD pin, while they are programed without stopping (because there is a maximum byte program time = 40us) by a code that resides in the RAM too. That would be a race against the time, since the BKGD interface is quite slow (for that). All this seems so complicated, that it suggests that there is another way of doing it.
Does anybody know about any documentation describing these procedures in detail or by example?