AnsweredAssumed Answered

KL25 FRDM Bootloader initialization location

Question asked by Stephen Cripps on Jan 30, 2015
Latest reply on Feb 2, 2015 by Hui_Ma

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

Outcomes