You are right, there are two mistakes (copy/paste, tests I made in history solving different issues,...)
the code I store in my PC is code I used for tests of different values and there are a few old info. Everything looks to be good except a few lines:
Original:
// ucx = Flash_Init(11059,90); // Oscillator clock is 11059 kHz, bus clock is 5.5296MHz => tbus=90ns
// or this function
FCLKDIV = 57;
(void)Flash_CatchError(ucx,1); // function used only for debugging purposes
// ucx = Flash_Init(16000,125); // Oscillator clock is 16000 kHz, bus clock is 8MHz => tbus=125ns
// ucx = Flash_Init(8000,250); // Oscillator clock is 8000 kHz, bus clock is 4MHz => tbus=250ns
// ucx = Flash_Init(5000,125); // Oscillator clock is 5000 kHz, bus clock is 8MHz => tbus=125ns
// ucx = Flash_Init(4000,500); // Oscillator clock is 4000 kHz, bus clock is 2MHz => tbus=500ns
Corrected values:
// ucx = Flash_Init(11059,180); // Oscillator clock is 11059 kHz, bus clock is 5.5296MHz => tbus=180ns
// or this function
FCLKDIV = 57; // absolutely correct for fosc 11059200Hz OSCCLK and 5529600 BUSCLK
(void)Flash_CatchError(ucx,1); // function used only for debugging purposes
// ucx = Flash_Init(16000,125); // Oscillator clock is 16000 kHz, bus clock is 8MHz => tbus=125ns
// ucx = Flash_Init(8000,250); // Oscillator clock is 8000 kHz, bus clock is 4MHz => tbus=250ns
// ucx = Flash_Init(5000,400); // Oscillator clock is 5000 kHz, bus clock is 8MHz => tbus=400ns
// ucx = Flash_Init(4000,500); // Oscillator clock is 4000 kHz, bus clock is 2MHz => tbus=500ns
fbus = OSCCLK/2 or PLLCLK/2 if PLL is used.
Tbus = 1 / fbus
OSCCLK is used as a source clock for flash.
Note. In the excel calculator BUSCLK do not have t be OSCCLK/2 because if you use PLL then BUSCLK=PLLCLK/2.
Best regards,
Ladislav