Using our customized board that is similar to the eval board, I am trying to enter bootloader mode following the reference manual IMXRT1050RM 9.13.3. The following is the code:
typedef struct
{
void (*runBootloader)(void *arg); /*!< Function to start the bootloader executing */
const uint32_t version; /*!< Bootloader version number */
const uint8_t *copyright; /*!< Bootloader Copyright */
const uint32_t reserved0;
flexspi_nor_driver_interface_t *flexSpiNorDriver; /*!< FLEXSPI NOR flash api */
} bootloader_api_entry_t;
/*******************************************************************************
* Variables
******************************************************************************/
#define g_bootloaderTree ((bootloader_api_entry_t *)*(uint32_t *)0x0020001cU)
status_t ROM_RUNBOOTLOADER(){
uint32_t arg=0xeb100000;
g_bootloaderTree->runBootloader(&arg);
}
But after the function ROM_RUNBOOTLOADER is called, the board just reboot normally without entering bootloader mode.
The board is set to boot internally, and it will enter bootloader mode if the flash is erased clean. Is there anything else I should try?