KL25 FRDM Bootloader initialization location

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

KL25 FRDM Bootloader initialization location

ソリューションへジャンプ
1,273件の閲覧回数
allgood38
Contributor I

Hello,

I am using the serial bootloader with processor expert, which is really, cool, I just have question about the way that it is initialized.

Bootloader here: Serial Bootloader for the Freedom Board with Processor Expert | MCU on Eclipse

Why does the check for a button press need to happen before the main loop is reached? Could the check for whether or not the bootloader runs not go into the main loop?

I.E. Why do we need the check here:

void __init_hardware(void)

{

  /*** User code before PE initialization ***/

  BL_CheckForUserApp(); /* check if we shall directly call the user app */

  /*** End of user code before PE initialization ***/

Instead of here:

int main(void)

/*lint -restore Enable MISRA rule (6.3) checking. */

{

  /* Write your local variable definition here */

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/

  PE_low_level_init();

  /*** End of Processor Expert internal initialization.                    ***/

  BL_Run();

I ask because I need to initialize a Bluetooth device, which after initialization becomes transparent as a UART device.


Thanks,

Stephen

ラベル(2)
0 件の賞賛
返信
1 解決策
929件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Stephen,

The bootloader needs to decide at startup if it shall run the Bootloader or the application. For this we need to have a decision criteria, which is typically a jumper or a push button to be pressed at power up to enter bootloader mode.

The check before the PE_low_level_init() routine in order to avoid some modules initialization affect application routine, such as MCG module working mode, pins multiplexed function setting and etc.

Wish it helps.


Have a great day,
best regards,

Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
930件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Stephen,

The bootloader needs to decide at startup if it shall run the Bootloader or the application. For this we need to have a decision criteria, which is typically a jumper or a push button to be pressed at power up to enter bootloader mode.

The check before the PE_low_level_init() routine in order to avoid some modules initialization affect application routine, such as MCG module working mode, pins multiplexed function setting and etc.

Wish it helps.


Have a great day,
best regards,

Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信