Faults while using MIMXRT1050-EVK

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Faults while using MIMXRT1050-EVK

跳至解决方案
2,988 次查看
aggarg
Contributor I

The issue was originally reported here: https://forums.freertos.org/t/i-mxrt1050-aws-demo-shadow-wiced-problems/10955

I am getting same faults when I try to debug the shadow sample. I have following questions:

  • All the faults are in mflash_drv_write_page_internal function which disables interrupts at the beginning and as soon as it re-enables interrupts, there is a fault. Sometimes it a memfault and sometimes it is a bus error. Does it ring any bell?
  • I want to use Segger Ozone with Segger JLink probe and for that I need the ROM bootloader address. What is the address of the ROM bootloader? Is it 0x1C00_0000? I tried configuring Ozone to jump to that address but that does not seem to work.
  • Is there anything extra (like removing/putting some jumpers) that I need to do to be able to use an external debug probe?

Thanks.

0 项奖励
回复
1 解答
2,803 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi aggarg,

  From the SDK change log, I just find the mflash fixed information:

Other changes:
* Fix issues with mflash driver
* Fix other build warnings, errors

  But about the details, I think we may compare with the old SDK and new mflash driver code directly.

 Anyway, customer can use the newest SDK directly, as it already fixed that issues.

  If you find any SDK bug, welcome to let us know.

  Thanks so much for your contribution.

Best Regards

kerry

 

在原帖中查看解决方案

0 项奖励
回复
12 回复数
2,943 次查看
aggarg
Contributor I

 

 

0 项奖励
回复
2,967 次查看
aggarg
Contributor I

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 see that this check does not exist here: https://github.com/NXPmicro/amazon-freertos/blob/feature/v1.4.7-nxp-support/lib/third_party/mcu_vend...

Can someone from NXP confirm if it is the right solution?

Thanks.

0 项奖励
回复
2,948 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi aggarg

   I really appreciate your effort to support the customer.

   You mentioned, you also reproduce the issues with the MIMXRT1050-EVKB and the Murata 1DX M.2 module + Murata uSD M.2 Adapter board, with the SDK2.8.2 evkbimxrt1050_aws_shadow_wiced, right?

    Could you tell me detail reproduce? Just download and enter the debug mode, then the fault happens?

   Before you download the code, could you please do the external flash mass erase at first, then download it again, whether you still can reproduce the issues or not? Please try it.

  BTW, do you have the IAR IDE, do you try the IAR project, whether still the same issues or not?

  Now, answer your original questions at first:

1. All the faults are in mflash_drv_write_page_internal function which disables interrupts at the beginning and as soon as it re-enables interrupts, there is a fault. Sometimes it a memfault and sometimes it is a bus error. Does it ring any bell?

Answer: The flash operation need to disable interrupt at first, to make sure the flash operation won't be interrupt. From your and the customer test result, seems related to this part. But the SDK original examples is tested before launch, seems some bug happens. So, I need to do more checking, if really has issues, I will also talk with our SDK team about these issues. I want to know, whether this issue is just in the MCUXPresso project or all other IDE the same project. Please give me more details to reproduce the issues, I will find time to test it on my side. Please erase all the external flash at first before the new project debugging.

2. I want to use Segger Ozone with Segger JLink probe and for that I need the ROM bootloader address. What is the address of the ROM bootloader? Is it 0x1C00_0000? I tried configuring Ozone to jump to that address but that does not seem to work.

Answer: I think you don't need to use the ROM bootloader, as this project is mainly run the flash API code, not the ROM code. The ROM will check the external 0X60000000 related data, eg, FCBD, if the code is valuable, it will jump to the related main code directly.

3. Is there anything extra (like removing/putting some jumpers) that I need to do to be able to use an external debug probe?

Answer: You can use the external JLINK debugger through the JTAG interface, you just need to remove the on board J32 J33, which will remove the on board CMSIS DAP debugger.

 

About your new updated post, you comment #ifndef XIP_EXTERNAL_FLASH , then the code will reconfigure the FlexSPI interface again instead of using the XIP hyperflash_config.

When you comment this, all the function still works without any issues? AWS still connect OK?

Please give me more testing details on your side, then I will try to reproduce the issue on my side and check with our internal related team.

 

Best Regards,

Kerry

 

 

0 项奖励
回复
2,935 次查看
aggarg
Contributor I

You mentioned, you also reproduce the issues with the MIMXRT1050-EVKB and the Murata 1DX M.2 module + Murata uSD M.2 Adapter board, with the SDK2.8.2 evkbimxrt1050_aws_shadow_wiced, right?

I do not have the Murata 1DX M.2 module - so my setup is MIMXRT1050-EVKB + Murata uSD M.2 Adapter board. As a result, I am not able to completely run the demo but the faults happen before wifi initialization failure.

Could you tell me detail reproduce? Just download and enter the debug mode, then the fault happens?

  • Install MCUXpresso 11.2.1.
  • Install SDK 2.8.6 EVK-IMIMXRT1050 in MCUXpresso by dragging and dropping the SDK zip into "Installed SDKs" view.
  • Click import examples from SDK.
  • Select evkbmimxrt1050 board.
  • Select aws_examples --> aws_shadow_wiced and click Finish.
  • Build and debug.

Please erase all the external flash at first before the new project debugging.

That does not help and I still get the same faults.

I think you don't need to use the ROM bootloader, as this project is mainly run the flash API code, not the ROM code. The ROM will check the external 0X60000000 related data, eg, FCBD, if the code is valuable, it will jump to the related main code directly.

That does not seem correct. If I configure Ozone to jump to 0X60000000, it will expect the first 2 words to be Stack Pointer and Reset Handler but the image at the address has a boot header which (per my understanding) is read by the boot-loader to correctly load the image.

You can use the external JLINK debugger through the JTAG interface, you just need to remove the on board J32 J33, which will remove the on board CMSIS DAP debugger.

Thank you for this information.

About your new updated post, you comment #ifndef XIP_EXTERNAL_FLASH , then the code will reconfigure the FlexSPI interface again instead of using the XIP hyperflash_config.

When you comment this, all the function still works without any issues? AWS still connect OK?

As I mentioned above, I do not have the WiFi module and therefore I am not able to run the complete demo but I do not get a fault anymore and the WiFi initialization fails (as expected). The customer has reported that the demo works for them.

Thanks.

0 项奖励
回复
2,924 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi aggarg

   Thanks for your detailed reply!

   I will find the related boards and test that project again on my side, if I reproduce the issues, I will report to the SDK team internally. 

   If the customer can make it work now, just let the customer use your solutions at first, any updated information from my side, I will also let you know.

 

Best Regards,

Kerry

0 项奖励
回复
2,851 次查看
aggarg
Contributor I

Any update on this?

Thanks.

0 项奖励
回复
2,826 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi aggarg,

  I am really so sorry for the later reply, it's really my fault to forget this post.

  Today, I test the newest SDK2.9.1 code for the RT1050, but I didn't meet the fault issues which you mentioned.

  These are my test result, you can find my code is working, and the shadow is updated in your AWS webpage:

image.png

image.png

image.png

I tested for a lot of times with the original SDK evkbimxrt1050_aws_shadow_wiced code in SDK2.9.1 , and I also add my :

- Murata 1DX M.2 module
- Murata uSD M.2 Adapter

image.png

So, if you have time, could you please check the newest SDK, whether you can meet the faults or not?

Until now, I didn't meet the faults issues, so please tell me the detail steps to reproduce the issues in the newest SDK2.9.1 for RT1050 with MCUXpressso 11.3.0.

Sorry for the later reply again.

Any updated information, please kindly let me know.

Best Regards,

kerry

 

0 项奖励
回复
2,815 次查看
aggarg
Contributor I

Hi @kerryzhou,

Thank you for your reply. I tested it with the SDK2.9.1 for RT1050 with MCUXpressso 11.3.0 and I do not get these faults anymore. I do see some changes in mflash_drv.c but I am not sure which one fixed it. Will be good to know the root case, in case you know or can find out.

Thanks again for your help!

Regards,
Gaurav

0 项奖励
回复
2,804 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi aggarg,

  From the SDK change log, I just find the mflash fixed information:

Other changes:
* Fix issues with mflash driver
* Fix other build warnings, errors

  But about the details, I think we may compare with the old SDK and new mflash driver code directly.

 Anyway, customer can use the newest SDK directly, as it already fixed that issues.

  If you find any SDK bug, welcome to let us know.

  Thanks so much for your contribution.

Best Regards

kerry

 

0 项奖励
回复
2,768 次查看
mkuczorra
Contributor III

Hi,

I am the customer.

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?

 

2.pnga52cd988524d783390183f21ab645dce67f0d637.png

0 项奖励
回复
2,796 次查看
aggarg
Contributor I

I assume that the change titled "Fix issues with mflash driver" would have fixed it. I agree that the issue is fixed and the customer is unblocked.

 

Thanks.

0 项奖励
回复
2,933 次查看
aggarg
Contributor I

Ignore my question about ROM bootloader and Segger Ozone. This wiki from Segger explains that I need to have empty definitions of AfterTargetDownload() and AfterTargetReset() in my jdebug file in case of ROM bootloader: https://wiki.segger.com/Debug_on_a_Target_with_Bootloader

Having empty definitions of AfterTargetDownload() and AfterTargetReset() and removing J32 and J33 works for me to get the Segger Ozone working.

Thanks.

标记 (1)
0 项奖励
回复