I.mxrt1050 aws demo shadow wiced problems

Apologies for the late reply. Would you please try to find the instruction that is causing fault. Here are the instructions about how to do that: https://www.freertos.org/Debugging-Hard-Faults-On-Cortex-M-Microcontrollers.html

Thanks,
Gaurav

Looking at the image you shared:

image

What is the line #149 in mflash_file.c?

-Gaurav

Hi Gaurav,

no need to apology here. I am very thankful for your help! Nevertheless I am bit frustrated that I have issues with demo apps.
Attached you will find what is in mflash:file.c - no changes made here.

I have a feeling that my problem has something do to with the priorities of the tasks but I have no idea how to solve this. I will go trough the link you provided. Thanks so far.

Could someone check my freeRTOSConfig.h (attached), please?
I have to admit that I am a absolute beginner to this. Sorry! Please let me know if you need any further information.FreeRTOSConfig.h (9.5 KB)

Edit: I am pretty sure that it has something to do with my task priorities…

Anyone? :frowning:
Should have something to do with the task priorities…

One more try… Can someone help me with setting up task priorities?

Looking at the line #149 return pdTRUE;, it is either return address (which is stored in LR) is corrupted or data access violation is imprecise. Would you please put a breakpoint at this line and share the call-stack? Also, how do you conclude that it is an issue with task priorities?

Would you want to hop on a call to debug this?

Thanks.

Hi aggarg,

a call would be great ! :slight_smile:

Please DM me your email and we can schedule a call to go over it.

Thanks.

Hi aggarg,

Thanks for helping me.
For everyone else: We decided to try Gnu Arm instead of MCUXpresso.

Hi @gammla,

I tested similar setup using PAN9026 module (I don’t have 1DX module) and I’m unable to reproduce your issue using MCUXpresso even after resets or reprogramming.
Can you provide a picture of your board to see all jumper settings? SW7 should be 0110 (Off-On-On-Off). I saw in one of your replies you configured it to 1001, can you double check?

Additionally, here are the MCU settings that I have on my project (default), I noticed that sometimes these get corrupted after importing project, so it’s worth double checking them:

Hi @juanpacheco,

thank you very much for responding.
I will attach an photo. SW7 is 0110. Please let me know if you need any further details.
I am intrested in trying the PAN9026 module. What do I need for this?

Thanks again
Maximilian


Hi @gammla,
Sorry, I don’t fully understand what you mean by “Even reconnect wont help. Only shutting down and wait”… Does this mean that if you disconnect and wait some time (how much?), after reconnecting the board, it suddenly works? Could you please explain a little more the exact behavior? When does it work? What’s the exact difference between “reconnect” and “shutting down and wait”? Perhaps a video of the whole situation: Working -> reset/reprogram -> not working

Are you using the default demo or did you make any modification (other than wifi and aws credentials)?

Your jumper configuration on 1DX module and rt1050… have you tried to power the 1DX module using the USB port on the module/adapter (setting J1[1-2] in 1DX module)? Notice that you’d need to power cycle the module with each example restart.

Also, what version of MCUXpresso IDE are you using?

Regarding the PAN9026 module, you can see some information about it here. And you can purchase if from different vendors…

Hi @juanpacheco,

so I started my PC first time this morgning and connected the board and it works (see picture attached):
Unbenannt
This will work most times.
Reconnecting it to the laptop or flash the board with the same project and Tera Term will show nothing and I cant control the board by Android App. I cant even reproduce it.

It is the default project without modification.
MCUXpresso version: v 11.2.0

To Do’s for me:

  • making a video - have to wait until it will work again
  • power the 1dx module separately --> does not help
  • buying Pan9026 module (?)

Best regards
Maximilian

Video of Debugging with failure: click
Video of working board with the exact same project, just leave it in a corner for a while and then connected it to laptop a few hours later: click2
Video of reconnecting board to laptop a few seconds later and nothing happens: click3

mcuxpresso 11.2.1 does not help

Please let me know if you need any further details.

I have got this hardware and I am also getting the same faults.

I have asked few questions here: https://community.nxp.com/t5/i-MX-Processors/Faults-while-using-MIMXRT1050-EVK/m-p/1198290

Thanks.

When I comment out the #ifndef XIP_EXTERNAL_FLASH check from mflash_drv_init_internal function in file mflash_drv.c, I no longer get these faults. I do not have the WiFi module and therefore cannot test the complete demo. @gammla, would you please do the same and share your results?

The updated definition of mflash_drv_init_internal should be:

static int32_t mflash_drv_init_internal(void)
{
    /* NOTE: Multithread access is not supported for SRAM target.
     *       XIP target MUST be protected by disabling global interrupts
     *       since all ISR (and API that is used inside) is placed at XIP.
     *       It is necessary to place at least "mflash_drv.o", "fsl_flexspi.o" to SRAM */
    /* disable interrupts when running from XIP
     * TODO: store/restore previous PRIMASK on stack to avoid
     * failure in case of nested critical sections !! */
    __asm("cpsid i");

//#ifndef XIP_EXTERNAL_FLASH
    flexspi_config_t config;
    /* Get FLEXSPI default settings and configure the flexspi. */
    FLEXSPI_GetDefaultConfig(&config);

    /* Set AHB buffer size for reading data through AHB bus. */
    config.ahbConfig.enableAHBPrefetch   = true;
    config.ahbConfig.enableAHBBufferable = true;
    config.ahbConfig.enableAHBCachable   = true;
    /* enable diff clock and DQS */
    config.enableSckBDiffOpt = true;
    config.rxSampleClock     = kFLEXSPI_ReadSampleClkExternalInputFromDqsPad;
    config.enableCombination = true;
    FLEXSPI_Init(MFLASH_FLEXSPI, &config);

    /* AHB Read Address option bit. This option bit is intend to remove AHB burst start address alignment limitation */
    MFLASH_FLEXSPI->AHBCR |= FLEXSPI_AHBCR_READADDROPT_MASK;

    /* Configure flash settings according to serial flash feature. */
    FLEXSPI_SetFlashConfig(MFLASH_FLEXSPI, &deviceconfig, kFLEXSPI_PortA1);
//#endif

    /* Update LUT table. */
    FLEXSPI_UpdateLUT(MFLASH_FLEXSPI, 0, customLUT, CUSTOM_LUT_LENGTH);

    /* Do software reset. */
    FLEXSPI_SoftwareReset(MFLASH_FLEXSPI);

    __asm("cpsie i");

    return 0;
}

Thanks.

I can hardly believe it, but it works! Thanks a lot!
@aggarg
@juanpacheco

This seems to be fixed in the latest version of MCUXpresso and SDK as mentioned here: https://community.nxp.com/t5/i-MX-Processors/Faults-while-using-MIMXRT1050-EVK/m-p/1198290

Thanks.

Hi aggarg,

thanks for replying.
I installed MCUXpresso 11.3.0 and SDK 2.9.1 but there isnt any aws_remote_control_wiced anymore. What do I wrong?

grafik

2.8.5.
grafik

Best regards

Hi @gammla,

This question is for NXP SDK and I’d suggest to ask this on NXP support forum.

Thanks.