Bootloader and app using same Vector, App don't work properly

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Bootloader and app using same Vector, App don't work properly

ソリューションへジャンプ
556件の閲覧回数
scary2021
Contributor II

I'm Using K60 with CW10.2 and MQX 3.8, based in example bootloader AN4368SW rev2.

After some tests I've discovered that all interrupts are working except USB(59h vector) used by the Bootloader. What can I do?

 

vectors.c from bootloader:

(tIsrFunc)USB_ISR, /*  0x59 0x00000164 - ivINT_USB0         This dont go */

(tIsrFunc)Cpu_Interrupt, /*  0x43 0x0000010C - ivINT_UART3_RX_TX        This perfect */


I have discovered that if I coment this lines in bsp_platform_init(void) in bootloader code, the app runs with usb interruption OK, but the bootloader don't.

    SIM_SOPT2 |= SIM_SOPT2_USBSRC_MASK | SIM_SOPT2_PLLFLLSEL_MASK;

    SIM_CLKDIV2=0x02;                               // USB Freq Divider  

  

    // weak pulldowns

    USB0_USBCTRL=0x40;

Someone can explain me why if this lines are executed the usb driver not initialize in the app, using MQX.

0 件の賞賛
1 解決策
447件の閲覧回数
scary2021
Contributor II

Solved , you have to boot your app before bsp_platform_init(void) in bootloader code is a problem with dual initialization of PLL.

元の投稿で解決策を見る

0 件の賞賛
1 返信
448件の閲覧回数
scary2021
Contributor II

Solved , you have to boot your app before bsp_platform_init(void) in bootloader code is a problem with dual initialization of PLL.

0 件の賞賛