Hello again,
we digged a little deeper into our issue. As sait before, the failing bootup was not very reproducible. It is occuring randomly instead. But I think, the reason is a different behaviour between flash tool and debug tool as mentioned first. To figure out the origin, we set a pin high at the very beginning of the bootloader main function to trigger a scope. Please find the code here:
void debug_sd_card_pin_init(void)
{
gpio_pin_config_t config = {kGPIO_DigitalOutput, 1, kGPIO_NoIntmode};
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_15_GPIO1_IO15, 0);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_15_GPIO1_IO15, ODE_0_Open_Drain_Disabled | DSE_7_R0 | SRE_0_Slow_Slew_Rate);
GPIO_PinInit(GPIO1, 15, &config);
GPIO_PinWrite(GPIO1, 15, 1);
}
//----------------------------------------------------------------------------
void main(void)
{
debug_sd_card_pin_init();
BOARD_ConfigMPU();
BOARD_BootClockRUN();
...
If we flash the bootloader by j-link debug tool, the measurement looks quite fine. (20221004_ch2_SDCMD_cd3_GP0_bootup_j-link.jpg)
If the exactly same file is flashed via flashloader tool, the measurement looks like picture 20221004_ch2_SDCMD_cd3_GP0_bootup_1st_functioncall.jpg .
Channel 2 (green) shows pin GPIO_SD_B1_05/USDHC2_CMD (the CMD pin used for SD-Card)
Channel 3 (red) shows pin GPIO_AD_B0_15_GPIO1_IO15
Do you have any clue what is causing this? We use the default settings in flashloader for flashing into QSPI NOR flash. (files attached)
Additional Info:
Version: Flashloader RT1050 1.1
The SD-Card was not inserted during measurements.
Thanks for your support,
kind regards,
Christian