Hi, i 've just downloaded the semc demo project for i.mxrt1050. i think there is a very fatal mistake
void SEMC_GetDefaultConfig(semc_config_t *config)
semc_axi_queueweight_t queueWeight; /*!< AXI queue weight. */
/* Get default settings. */
config->dqsMode = kSEMC_Loopbackinternal;
config->cmdTimeoutCycles = 0;
config->busTimeoutCycles = 0x1F;
/* Set a typical weight settings. */
memset((void *)&queueWeight, 0, sizeof(semc_axi_queueweight_t));
queueaWeight.qos = SEMC_BMCR0_TYPICAL_WQOS;
queueaWeight.aging = SEMC_BMCR0_TYPICAL_WAGE;
queueaWeight.slaveHitSwith = SEMC_BMCR0_TYPICAL_WSH;
queueaWeight.slaveHitNoswitch = SEMC_BMCR0_TYPICAL_WRWS;
queuebWeight.qos = SEMC_BMCR1_TYPICAL_WQOS;
queuebWeight.aging = SEMC_BMCR1_TYPICAL_WAGE;
queuebWeight.slaveHitSwith = SEMC_BMCR1_TYPICAL_WRWS;
queuebWeight.weightPagehit = SEMC_BMCR1_TYPICAL_WPH;
queuebWeight.bankRotation = SEMC_BMCR1_TYPICAL_WBR;
config->queueWeight.queueaWeight = &queueaWeight;
config->queueWeight.queuebWeight = &queuebWeight;
Both vars "queueaWeight" and "queuebWeight" are on the stack.
The function void SEMC_Init reads the pointers, etc., etc. etc.
How can this work? The content of the Stackmem is not saved....