Hi,
After a while i'm back to my project where i use uTasker bootloader but i'm struggling to run my application from it.
Bootloader is setup for MSD and it's working perfectly fine but when i load my application using it, it runs but the clocks are wrong(pwm outputs are off, rgb diodes acts weird, usb enumartion fails etc).
I tried to setup SOPT and SCGC registers to defaults before i run my code but it doesn't help.
The application runs just fine without bootloader.
Here is beggining of the main:
SCB -> VTOR = 0x1fffe000;
memcpy((uint32_t*)0x1fffe000,(uint32_t*)0x00008080,0x200);
SIM->SOPT1 =0;
SIM->SOPT2 =0x1000;
SIM->SOPT4 =0;
SIM->SOPT5 =0;
SIM->SOPT7 =0;
SIM->SOPT8 =0;
SIM->SCGC4= 0x100000;
SIM->SCGC5= 0x00;
SIM->SCGC6= 0x01;
SIM->SCGC7= 0x02;
BOARD_InitBootClocks();
The biggest problem is that i can't debug my application while bootloader is flashed so i'm unable to see what went wrong and why my clocks are off :smileysad:
Attaching also picture of main code clock setup:

Any ideas what i can do to make it work?